New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow registering xmlns prefixes for foreign assemblies #96

taori opened this Issue Dec 5, 2018 · 2 comments


None yet
4 participants

taori commented Dec 5, 2018

As pointed out in #45, using

[assembly: XmlnsPrefix("", "custom")]
[assembly: XmlnsDefinition("", "MyClassNamespace")]

only works for assemblies you own.

It would be nice if you could declare those attributes at application level, to provide controls of an assembly with custom namespaces, if they lack those attributes, or even override them.

While the later one isn't essential, i think the first one could be useful, if people share their controls on nuget and don't know about custom namespace prefixes.

At least i've had situations where i was annoyed with the awfully verbose prefixes others chose, or the lack of them alltogether.

Another scenario would be that you are supplied with a viewmodels assembly and are going to use those in your views. Being able to group those namespaces would be neat.


This comment has been minimized.

mstrobel commented Dec 6, 2018

The prefixes are only suggestions, and you can always substitute your own at the import site. Being able to add XmlnsDefinition mappings for external assemblies is the far more interesting part of this proposal.

Interestingly, XmlnsDefinitionAttribute already has an AssemblyName property, but as far as I can tell, System.Xaml simply ignores it. Perhaps this is a capability that Microsoft intended to implement, but simply didn’t.


This comment has been minimized.

rrelyea commented Dec 6, 2018

From: Rob Relyea
Sent: Tuesday, January 19, 2010 8:50 AM
To: Mark;Michael
Cc: David
Subject: RE: Is the AssemblyName property on XmlnsDefinitionAttribute supposed to have any effect?

Yes, that property is kindof a noop…that we discovered late in the game.
The idea was to let WindowsFormsIntegration.dll provide an XmlnsDefinitionAttribute for v2 windorms in v3.

No scenarios have been blocked with the noop.

@rladuca rladuca added this to the Future milestone Dec 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment