Back to Devexpress

Break Apart/LineUp Attributes (XAML)

coderushforroslyn-116323-code-style-assistance-code-formatters-break-apart-lineup-attributes-xaml.md

latest1.0 KB
Original Source

Break Apart/LineUp Attributes (XAML)

  • Aug 03, 2020

Purpose

This Code Formatter is used to collapse the attributes of a XAML tag into a single line or break them apart.

Availability

Available when the caret is on a XAML tag with two or more attributes.

Usage

  1. Place the caret on a XAML tag with two or more attributes.

  2. Press the Ctrl + . or Ctrl + ~ shortcut to invoke the Code Actions menu.

  3. Select Break Apart Attributes from the menu ( LineUp Attributes if you need to collapse attributes to a single line).

After execution, the Code Formatter removes the line breaks and converts the attributes into a single-line form or expands them to a multiple-line form.

xaml
<Window x:Class="DemoApplication.DemoWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="DemoWindow"
        Height="350"
        Width="525">