2

I have scenario where my loose xaml file can contain the custom control from another assembly. How do i make a reference to that assembly. My Loose XAML and assembly are at the same path.

I know the embedded xaml or xaml with in a project, the reference is added like this: xmlns:WpfToolKit="http://schemas.microsoft.com/wpf/2008/toolkit"

Now how can i give similar type of reference in the loose xaml file.

4

1 回答 1

0

像这样:

xmlns:Awesome="clr-namespace:MyAwesomeNameSpace"

然后像这样使用您的控件:

<Awesome:MyAwesomeControl />

对于好看的架构,请阅读 MSDN 上的这篇文章:http: //msdn.microsoft.com/en-us/library/ms747086.aspx

您将需要类上的XmlnsDefinitionAttribute定义。

希望这可以帮助!

于 2010-06-25T11:51:41.980 回答