WPF:ObjectBindingProvider中ObjectType中的x和m是什么? [英] WPF: What x and m in ObjectType in ObjectBindingProvider?
本文介绍了WPF:ObjectBindingProvider中ObjectType中的x和m是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是WPF新手。在ObjectBindingProvider中有关于Objecttype的问题。
示例:
< stackpanel.resources>
< ObjectDataProvider ObjectType ={x:Type m:StringData}
x:Key =objStringsMethodName =GetStrings/>
对象类型中x和m的使用是什么?
有什么想法吗?
Hi,
I am new with WPF. Had question about Objecttype in ObjectBindingProvider.
Example:
<stackpanel.resources>
<ObjectDataProvider ObjectType="{x:Type m:StringData}"
x:Key="objStrings" MethodName="GetStrings"/>
what is use of x and m in objecttype?
Any idea?
推荐答案
它们是名称空间前缀 - MSDN文档 [< a href =https://msdn.microsoft.com/en-us/library/ms747086(v=vs.110).aspx\"target =_ blanktitle =New Window> ^ ]
x:可能是
They are namespace prefixes - MSDN documentation[^]
x: is likely to be
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
m:可能是
m: is likely to be
xmlns:m="clr-namespace:Microsoft.Maps.MapControl.WPF;assembly=Microsoft.Maps.MapControl.WPF">
查看XAML的顶部,您将看到Window标记中列出的名称空间。
在您的示例中 x:使用类型
而不是类型
区别于
xmlns:system="clr-namespace:System;assembly=mscorlib"
这篇关于WPF:ObjectBindingProvider中ObjectType中的x和m是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文