2

Telerik 名前空間に注意してください。あなたが期待するようなものではありませんclr-namespace:Telerik;assembly=Telerik。彼らはどのようにそれをしましたか?

<UserControl x:Class="Sandbox.MyUserControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
    </Grid>
</UserControl>
4

1 に答える 1

3

XmlnsDefinition属性を使用して、1 つ以上の CLR 名前空間を URI にマップできます。例えば:

[assembly: XmlnsDefinition("http://www.yourdomain.com/schema", "MyProject.Foo")]
[assembly: XmlnsDefinition("http://www.yourdomain.com/schema", "MyProject.Bar")]
[assembly: XmlnsDefinition("http://www.yourdomain.com/schema", "MyProject.Baz")]

この属性を使用してXmlnsPrefix、名前空間のデフォルト プレフィックスを関連付けることもできます。

[assembly: XmlnsPrefix("http://www.yourdomain.com/schema/", "foo")]

この属性は、編集ツールの提案としてのみ使用されることに注意してください。

于 2013-09-27T11:35:28.250 に答える