icsharpcode / WpfDesigner

The WPF Designer from SharpDevelop
MIT License
949 stars 251 forks source link

Fixed a bug for root nodes with namespace prefix #26

Closed awraae closed 7 years ago

awraae commented 7 years ago

This fixes a bug in XamlDocument when you have a DocumentElement which is not in the presentation namespace (http://schemas.microsoft.com/winfx/2006/xaml/presentation).

When inserting a new control with the same namespace as the DocumentElement, the GetPrefixForNamespace method would return an empty string. With this fix the correct prefix is now returned.

I certify that I own, and have sufficient rights to contribute, all source code and related material intended to be compiled or integrated with the source code for the WPF Designer open source product (the "Contribution"). My Contribution is licensed under the MIT License.