Fixed a bug in MarkupExtensionPrinter to make the tests pass; it now handles spaces and backslashes correctly when printing shorthand markup extensions.
When using GetPrefixOfNamespace the XMLElement may not yet be in the XML Tree, but the Xaml Object has it ParentObject Property already set, so use this!
src\AddIns\DisplayBindings\WpfDesign\WpfDesign.XamlDom\Project\XamlProperty.cs
Original author: Tobias Gummesson
------------------------------------------------------------------------------------------------------------------------
The previous solution regarding XAML names expected all properties of type string named Name to represent a name in XAML namescope, and this caused trouble with types with a property named Name that did not represent a XAML name. In this case the value of the property tried to be registered as name to the namescope and this caused either the value to be occupied as name, or threw an exception if name already was taken or the value consisted of characters forbidden in XAML names causing the value to not be set at all.
To solve this the value of a Name property is only registered to namescope if the property represents a XAML name (defined by RuntimeNamePropertyAttribute).
Also added a Name property to XamlObject that always sets the name to x:Name attribute, but gets it from either x:Name or the property that represents the XAML name if it exists (both are valid places for name registration).
Fixed a bug in XamlParser where x:Name value was not registered in its namescope.
All other changes (for example changes in PropertyGrid/XamlDesignItem) was to support the Name fixes described above.
- XamlParser throws an exception on error if error sink not available
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3529 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
- Support for NameScopes, Binding
- Remove TreeView dependency from PropertyGrid (now DataTemplates)
- Fixing Outline, XamlFormatter, ME Tokenizer/Parser
- Expremints with EnumBar
Broken:
- BrushEditor (serialization still required)
- XamlObject.XmlElement must be always consistent
(in the case of ME it's detached from real Xml), during parsing too.
TODO: Designer Itself!
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3329 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61