XAML Format
omariom opened this issue · 4 comments
If we are going to have XAML Standard, we even more need XAML Format - one and the only way to format XAML code.
Other communities have already realized that having one way to format code make code easier to author, read and support.
<XAML.Format>all the things</XAML.Format>
It's not like there's a single C# format. It's all about being flexible and each team develops its own standard. You can always use something like https://marketplace.visualstudio.com/items?itemName=NicoVermeir.XAMLStyler to enforce a certain format within your team.
I suggest having something like gofmt.
Xaml is a much more simple language than Go. We shouldn't have different ways to format it.
To be honest I would prefer to have csharpfmt too.
having different ways to achieve the same is not about beeing flexible but about chaos and not having a plan. arguing that "its not like theres a single c# format" is like making one flaw looking good by pointing out there are so many other design flaws as well. like with .net standard and .net-core XAML should have an identical core with additional things available just on one or another platform by adding a reference. even UWP does it that way that there is a core of features thats the same on every windows-platform and separate things that can be added for xbox,desktop,mobile,hololens
XAML is just XML, so you use any XML formatting tool to format your markup.
XML doesn't have any formatting standard but 2 space indention is common.
In the XAML community, I believe one attribute per line is common too.