XAML Reformat code

Completed

How i can change this strange ReSharper formatting?

Please look at ColumnDefinitions. First two are one bellow previous, but last 3 are in one row.

I what to turn off reformat to make one line from all definitions.

BEFORE:

 

AFTER:

 

BEFORE REFORMAT:

  <Grid MaxWidth="848">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*"
MaxWidth="288" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>

 

AFTER REFORMAT:

<Grid MaxWidth="848">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*"
MaxWidth="288" />
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions>

 

 

 

Resharper 2019.1.1

Microsoft Visual Studio Professional 2017
Version 15.9.12
VisualStudio.15.Release/15.9.12+28307.665
Microsoft .NET Framework
Version 4.7.03062

 

2
4 comments

Hello Emil!

 

Please specify what shortcut/command you're using for reformatting code?

Could you please share your settings (https://www.jetbrains.com/help/resharper/Sharing_Configuration_Options.html#managing) using 'Submit a request' form.

Thank you.

 

0

Hello Emil!

Please try enabling ReSharper | Options | Code Editing | XML | Formatting Style | Around tags | Place singleline elements on new line.
Thank you.

0
Avatar
Permanently deleted user

Здравей, Ангелина

Сега е ОК.

Би трябвало след като имате отделни настройки за XAML да не променям XML, а тези промени да се отразяват и в XAML.

За почти всички програмисти XAML не е XML, колкото и да си приличат.

0

Thank you for the reply, Emil.

Currently ReSharper XAML formatting settings inherit XML formatting settings.

Here's corresponding request on separating these options - https://youtrack.jetbrains.com/issue/RSRP-463865.

You are welcome to comment or vote for it.

Thank you.

0

Please sign in to leave a comment.