Code Monkey home page Code Monkey logo

Comments (4)

rhayhurst avatar rhayhurst commented on June 23, 2024

Oh, sorry, should've mentioned this:
I'm on Windows 11, specifically:
Windows 11 Pro version 22H2, OS build 22621.2428

from xamlstyler.

grochocki avatar grochocki commented on June 23, 2024

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.

rhayhurst avatar rhayhurst commented on June 23, 2024

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.

grochocki avatar grochocki commented on June 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.