WPF XAML Namespace import
I've found that in order to use PRISM's classes in XAML you need to import namespace in that way: xmlns:cal="http://www.codeplex.com/CompositeWPF" this way is new to me, so I wanted to know, how hyperlink could be alias of usual notation of namespace import? so the intelli开发者_如何学编程sence knows in which assembly it should search this component? Thanks!
If you look in the AssemblyInfo.cs file for an assembly you are interested in, there is typically an assembly attribute that maps a URI to a CLR namespace. Here's an example:
[assembly: XmlnsDefinition("http://www.dummy.com/Stuff",
"Dummy.Common.UI")]
You can combine multiple mappings to the same URI as well:
[assembly: XmlnsDefinition("http://www.dummy.com/Stuff",
"Dummy.Common.UI")]
[assembly: XmlnsDefinition("http://www.dummy.com/Stuff",
"Dummy.Common.UI.Controls")]
These can even cross assemblies... you can use the same URI to map namespaces from multiple assemblies.
It's helpful to use this yourself as well! It's pretty convenient.
精彩评论