Skip to content

Attribute Reordering

David Grochocki edited this page Aug 2, 2016 · 6 revisions

####Enable Attribute Reordering#### Defines whether attributes should be reordered. If false, attributes will not be reordered in any way.

Default Value: true

Enable Attribute Reordering Example

####Attribute Ordering Rule Groups#### Defines attribute ordering rule groups. Each string element is one group. Use ',' as a delimiter between attributes. 'DOS' wildcards are allowed. XAML Styler will order attributes in groups from top to bottom, and within groups left to right.

Default Value:

"x:Class*",
"xmlns, xmlns:x",
"xmlns:*",
"x:Key, Key, x:Name, Name, x:Uid, Uid, Title",
"Grid.Row, Grid.RowSpan, Grid.Column, Grid.ColumnSpan, Canvas.Left, Canvas.Top, Canvas.Right, Canvas.Bottom",
"Width, Height, MinWidth, MinHeight, MaxWidth, MaxHeight",
"Margin, Padding, HorizontalAlignment, VerticalAlignment, HorizontalContentAlignment, VerticalContentAlignment, Panel.ZIndex",
"Style, Background, Foreground, Fill, BorderBrush, BorderThickness, Stroke, StrokeThickness, Opacity",
"FontFamily, FontSize, LineHeight, FontWeight, FontStyle, FontStretch",
"*:*, *",
"PageSource, PageIndex, Offset, Color, TargetName, Property, Value, StartPoint, EndPoint",
"mc:Ignorable, d:IsDataSource, d:LayoutOverrides, d:IsStaticText"

####First Line Attributes (Pre-Release)#### Defines a list of attributes which should always appear on the same line as the element's start tag. Attribute reordering must be enabled for this setting to take effect.

Default Value: None

First Line Attributes Example

####Order Attributes by Name#### Defines whether attributes should be ordered by name if not determined by a rule.

Default Value: true

Order Attributes by Name Example