XamlStyler icon indicating copy to clipboard operation
XamlStyler copied to clipboard

Preserve multi line in attribute values

Open marcells opened this issue 5 years ago • 2 comments

We have the following valid XAML:

<Border cal:Message.Attach="[Event MouseLeave] = [Action ChangeHighlighting];
                            [Event PreviewMouseDown] = [Action SelectOrSave];
                            [Event PreviewKeyDown] = [Action ExecuteOn($pressedKey)];">
   ...
</Border>

The XAML-Styler always modifies exisiting attribute values to:

<Border cal:Message.Attach="[Event MouseLeave] = [Action ChangeHighlighting];    [Event PreviewMouseDown] = [Action SelectOrSave];   [Event PreviewKeyDown] = [Action ExecuteOn($pressedKey)];">
   ...
</Border>

I think the behavior comes from the XML-Functions of .NET. Maybe you can provide a configuration flag in XAML-Styler to preserve this behavior. Or maybe this configuration exists and I did not find it.

marcells avatar Feb 15 '19 10:02 marcells

ran into this issue today and thought it was just me!

owns avatar Mar 28 '20 03:03 owns

I have the same problem with uniting a multiline binding expression into one line. This will prevent me from using this extension until this problem is fixed.

kateryna-novak avatar Feb 11 '22 18:02 kateryna-novak