[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
  System Requirements
  Improve Performance
 [Expand]Features by Language
 [Expand]Getting Started
 [Expand]How To
 [Expand]Coding Assistance
 [Expand]Navigation and Search Tools
 [Expand]Static Code Analysis
 [Expand]Visualization Tools
 [Collapse]Code Style Assistance
  [Expand]Code Formatters
   Programming Style Rules
   Naming Conventions
  [Expand]Code Cleanup
   Remove Unused Assembly References
  [Expand]Document Formatting (C#)
   Document Formatting (XAML)
   Organize Members
   Move Member to Region
  Building Assistance
  Debugging Assistance
 [Expand]Refactoring Assistance
 [Expand]Unit Testing Assistance
 [Expand]Decompiling Tools
 [Expand]Configuration Options
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Document Formatting (XAML)

This feature is used to format XAML documents.

Expanded Usage

  1. Place the caret into a XAML document.


    The blinking cursor shows the caret's position at which the Code Formatter is available.

  2. Use the Ctrl + . or Ctrl + ~ shortcut to invoke the Code Actions Menu.
  3. Select Format Document from the menu.

After execution, XAML Document Formatter adds and removes the line breaks and indentations at the required places, so that the indentation of each tag corresponds to its folding level.

Expanded Configuration

The configuration options for XAML Document Formatter are available in the Editor | XAML | Formatting options page.

You can configure the following aspects of code formating:

  • Attribute Formatting — configures in which cases and how to break apart the element attributes.
  • Attribute Reordering — switches Attribute Reordering on and off, and configures the desired attributes order.
  • Element Formatting — configures multiple aspects of XAML element formatting.
  • Element Reordering — enables or disables the Grid, Canvas, and Setter sorting.
  • Markup Extension Formatting — configures the formatting options for XAML Markup Extensions.

Expanded See Also

Is this topic helpful?​​​​​​​