views:

15

answers:

1

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.

A: 

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!

Arcturus
you had not gone through my problem. Its about assembly reference in loose xaml.
Amod
updated answer!
Arcturus
could you provide some example code how can use XmlnsDefinitionAttribute. I want to give reference of WPFToolkit.dll
Amod