的映射使用XmlnsDefinition
属性来完成。例如:
[assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Data")]
[assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows")]
[assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Controls.Primitives")]
[assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Media.Animation")]
[assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Input")]
谢谢(从PresentationFramework.dll代码反射中提取),这样我就可以使用相同的URL过,对吧? – 2010-03-25 17:01:22
是的,但我不会推荐它,因为它可能会导致您的类和标准WPF名称空间之间的冲突 – 2010-03-25 17:06:41
谢谢,听起来很合理。 – 2010-03-25 17:09:50