Comments (4)
Oh, sorry, should've mentioned this:
I'm on Windows 11, specifically:
Windows 11 Pro version 22H2, OS build 22621.2428
from xamlstyler.
By default, attributes are not ordered strictly alphabetical, but rather by a set of Attribute Ordering Rule Groups. Wildcards within rule groups will be alphabetized. Strict alphabetization of all attributes is not something that would be generally accepted as a best practice in XAML, but you should still be able to achieve this by changing Attribute Ordering Rule Groups from:
"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",
"*:*, *",
"PageSource, PageIndex, Offset, Color, TargetName, Property, Value, StartPoint, EndPoint",
"mc:Ignorable, d:IsDataSource, d:LayoutOverrides, d:IsStaticText",
"Storyboard.*, From, To, Duration"
to
"*:*, *"
from xamlstyler.
Why wouldn't strict alphabetization not be considered a best practice in Xaml? I don't see how it hurts anything. When I read the description of the XamlStyler, I was under the direct impression that alphabetizing attributes was kind of what it did -- other stuff, too, but that was one of the main functions. It's why I downloaded it.
Anyways, I'll give your instructions a shot. Thanks!
from xamlstyler.
There are certain logical groupings of attributes that sometimes makes it easier when adjusting them. For example, Width
, Height
, MaxWidth
, MaxHeight
, etc., so you will typically see certain attributes next to each other. In the default rule ordering groups, we separate these out, leaving everything else to the middle alphabetized catch all group *:*, *
.
from xamlstyler.
Related Issues (20)
- Rider 2023.3 support
- Unexpected results with <elements> in text HOT 3
- Unhandled FileNotFoundException when specifying an invalid file in XAML console
- Styles doesn't break line with a long binding expression - Styler should break lines when there are binding parameters
- Add option to list failures when running in Passive mode HOT 1
- Suggestion: Central package versioning HOT 1
- Visual Studio reports vulnerability in nuget reference HOT 3
- The package 'StylerPackage' did not load correctly HOT 4
- [Bug Report] Error when formatting project file HOT 1
- Incompatible with Rider EAP HOT 7
- Error to edit .csproj files on VS 17.9.0 HOT 5
- The description and the title of the Addin is incorrect
- TODO: Release XamlStyler 3.2401 HOT 5
- Generate JSON Schema for config file HOT 1
- When adding a Propertygroup to a project XAML, an error in StylerPackage appears HOT 3
- DataGrid Header HOT 3
- No such interface supported HOT 1
- New releases blocked on release build extension deployment bug and VS debugging HOT 7
- Final feature update and deprecate support for Visual Studio 2017
- Update Newtonsoft.Json package to version 12.0.2 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xamlstyler.