WP7 custom namespaces and prefixes
I came across this webpage about how to have cleaner namespaces in silverlight http://www.codeproject.com/KB/silverlight/xaml_custom_namespaces.aspx
Anybody know if this works for WP7 too?
When I try it I get an message that "Type or namespace name 'myclassname' could not be found"
This is what I have in my AssemblyInfo.cs:
//Map all Namespaces in the project to the IQ prefix
[assembly: XmlnsPrefix("http://schemas.myapp.com/wp7/", "iq")]
[assembly: XmlnsDefinition("http://schemas.myapp.com/wp7/", "MyApp.Controls")]
And in开发者_如何学编程 my page:
xmlns:iq="http://schemas.myapp.com/wp7/"
Mapping a C# namespace to a string (typically a URI) for your own assemblies is a Silverlight 4 feature. Silverlight for WP7 is based on Silverlight 3, hence this feature is most likely absent.
精彩评论