Skip to content

KevinSchiener/XamlStyler

 
 

XamlStyler

A fork of the original Xaml Styler plugin as found on http://xamlstyler.codeplex.com This fork has been created to continue development on the awesome XAML styler plugin created by Chris Chaochen. To support the efforts Chris has put into this project my fork will only support Visual Studio 2013 and higher. For Visual Studio 2012 support please install Chris his version.

Features

  • Format/Beautify Xaml markup in one click.

beautify option

  • Sort attributes based on following rules:
    • x:Class
    • XML Namespaces
      • WPF built-in namespaces
      • User defined namespaces
    • Key, Name or Title attributes
      • x:Key
      • x:Name
      • Title
    • Grid or Canvas related attached layout attributes
      • Numeric layout attributes Width/MinWidth/MaxWidth
      • Height/MinHeight/MaxHeight
      • Margin
    • Alignment related attributes HorizontalAlignment/ContentHorizontalAlignment
      • VerticalAlignment/ContentVerticalAlignment
      • Panel.ZIndex
    • Other attributes
  • Short attributes tolerance.
    • When an element contains 2 or less than 2 attributes, line break is not applied for * better readability.
  • Special characters(e.g., &) are preserved.
  • Respect "significant" whitespace situation.
    • No new linefeed will be added to , if it is immediatly following *another element to prevent the rendering of unexpected space.
Significant Whitespace between <Run/>
  No Whitespace between <Run/>
 vs
<TextBlock>
<Run>A<Run>
<Run>B<Run>
</TextBlock>
 vs
<TextBlock>
<Run>A<Run><Run>B<Run>
</TextBlock>
  • Indent Xaml markup based on "Tab Size/Indent Size/Indent Charater" settings available in "Option/Text Editor/XAML/Tabs" page.

markup settings

  • XamlStyler specific options.
    • Define your own attribute ordering rules
    • Define your own attribute line break rules
    • Markup extension formatting
    • Automatically reformat Xaml file on saving

xamlstyler options

  • Import/Export XamlStyler settings.

export settings

Contribute

Thanks to our contributers!

  • Bart Lannoeye
  • Kevin Dockx
  • Philip Hoppe
  • Pedro Lamas
  • RandomEngy

About

A fork of the original Xaml Styler plugin as found on http://xamlstyler.codeplex.com

Resources

License

Apache-2.0, Apache-2.0 licenses found

Licenses found

Apache-2.0
LICENSE
Apache-2.0
LICENSE.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 74.9%
  • HTML 25.1%