Xavalon / XamlStyler

Visual Studio extension to help format your XAML source code
Apache License 2.0
1.17k stars 128 forks source link

Error in StylerPackage (regarding &) #449

Closed administersoftware closed 8 months ago

administersoftware commented 9 months ago

In my WPF XAML I'm trying to set a ToolTip="URL & ID", but when saving XamlStyler doesn't seem to like the & and comes up with the following:

image

Version Info:

Colin.

grochocki commented 8 months ago

This seems to be an instance of leveraging a XML character entity. In this case, you should use & to encode the ampersand in ToolTip.

Dupe of #284. This is a possible candidate for surfacing in some sort of error/warning UI in the future as part of #271, but this is otherwise by design due to XAML language spec. Here is some more information on XML Character Entities and XAML.