How to refernce a Namespace in XAML code?

XAML has a special format for referncing namespaces. In order to refernce a  namespace that is not included in the default WPF namespace you will have to do it in the following format.

 

First, refernce the namespace in your code in the following format:

xmlns:Prefix=”clr-namespace:Namespace;assembly=AssemblyName

Second, use the your chosen prefix in declaring your objects in the following format:

< Prefix:YourObject …. / >

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: