开发者

Assembly Reference in Loose XAML

开发者 https://www.devze.com 2023-01-04 09:29 出处:网络
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 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开发者_如何学JAVA/wpf/2008/toolkit"

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


Like so:

xmlns:Awesome="clr-namespace:MyAwesomeNameSpace"

And then use your controls as such:

<Awesome:MyAwesomeControl />

For nice looking schemas, please read this article on MSDN: http://msdn.microsoft.com/en-us/library/ms747086.aspx

You will need the XmlnsDefinitionAttribute definition on your class.

Hope this helps!

0

精彩评论

暂无评论...
验证码 换一张
取 消