mfractor / mfractor-feedback

Found a bug or have a feature request for MFractor? Submit it here!
3 stars 0 forks source link

XAML Code Action Split Attributes should allow split to new line #180

Closed ravero closed 4 years ago

ravero commented 4 years ago

This code action is very useful, but it should allow for setting different styles of applying it. The default implementation splits the attributes on lines by keeping the first attribute in the first then aligning the other attributes in the lines below at the same column:

<Label Text="Welcome to Xamarin.Forms!"
       HorizontalOptions="Center"
       VerticalOptions="CenterAndExpand"/>

This is one of the employed standards and is very used in WPF, but another style that is very popular is just by splitting attributes onto its own just adding a tabulation:

<Label
    Text="Welcome to Xamarin.Forms!"
    HorizontalOptions="Center"
    VerticalOptions="CenterAndExpand" />

MFractor would allow applying both styles. This may come as a setting.

matthewrdev commented 4 years ago

@ravero We can surface this as a setting in the formatting options panel.

ravero commented 4 years ago

This is how the XAML Styler handles that, so I think it makes sense. Also we can think of adding project specific settings to mfc file.

matthewrdev commented 4 years ago

This has been added and will be available in MFractor v4.0.6.

image