Add support for 'XmlnsDefinitionAttribute'
XmlnsDefinitionAttribute is an absolutely great attribute for Control Library developers. It allows the developers of that control library to greatly simplify the xaml by reducing the number of XMLNS declarations they need.
The only way around this is for the control vendor to throw every single class that might be used in XAML (not just controls but other types too), in the same namespace, creating a very ugly unwieldy API to code against.
If you use a 3rd party control library or you're a control library vendor, you should vote for this. It'll save you a lot of typing, looking for controls and types etc.
Thanks for this feedback, this is an area that is being discussed on how we might improve the overall XAML verbosity syntax as well as make this easier for customers of ISV controls.
Thank you for your efforts, Morten!
Morten Nielsen commented
Also added this suggestion to the XAML Standard, please also comment over there as well: https://github.com/Microsoft/xaml-standard/issues/141
it is also quite useful for creating porting layers so that you have older code work as is (have used it to easier share code between Silverlight and WPF)
Great to hear you are accepting feedback! FWIW, there is an open discussion on the CoreFX GitHub to port System.Xaml over to .NET Core. As you know there are other flavors of Xaml floating around: Portable.Xaml, OmniXaml, Xamarin.Forms, the big daddy System.Xaml, and of course the baby Xaml implementation UWP Xaml. :)
It would be awesome to unify all of these under one new cross-platform implementation. Please feel free to join the conversation here: https://github.com/dotnet/corefx/issues/5766
Juan Marco commented
9 months to start a discussion or to even acknowledge a very obvious request. Dysfunctional with a capital D. Visual Studio team needs to take over this group and show them how to get things done.
Yet another instance of missing System.Xaml functionality. Related vote: https://wpdev.uservoice.com/forums/110705-dev-platform/suggestions/7232264-add-markup-extensions-to-and-improve-winrt-xaml
Michael Crump commented
I'm 100% behind this. It would cut development cost and is an excellent idea.
Brian Lagunas commented
As a control vendor, this would make not only our customers lives so much better, but ours as well.
Just yesterday I was looking for this that goes in the Assemblyinfo.cs, with that you do not need in XAML add xmlns:sdk, xmlns:vm, etc. It is a must have