2011-03-28 81 views

回答

0

您可以通过添加这个命名空间上面设置你的控制要包括在默认的xmlns:

[assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "MyControls.MarkupExtensions")] 
namespace MyControls.MarkupExtensions 
{ 
... 
} 

这只是将它们添加到内置控件的XMLNS而不是取代它。这样做时,您必须小心,不要踩在任何内置控件的名称上。

+0

我有以下错误:错误1在程序集'GenericTemplate'中出现无效的XmlnsDeclaration。 XmlnsDeclaration引用不在程序集中的名称空间'http://schemas.telerik.com/2008/xaml/presentation'。 – Poma 2011-03-28 23:35:28

+0

请尝试使用我的示例中的默认Microsoft,或者在您的项目中将一个引用添加到声明xml名称空间的Telerik程序集中。 – 2011-03-29 00:25:22

+0

包括在内。我使用'xmlns:t =“http://schemas.telerik.com/2008/xaml/presentation”'。是的,我已经试过它与微软汇编:'[assembly:XmlnsDefinition(“http://schemas.microsoft.com/winfx/2006/xaml/presentation”,“http://schemas.telerik.com/2008/xaml/presentation“)]' – Poma 2011-03-29 00:41:26

相关问题