How to: Change XAML View Settings

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

You can change the appearance and behavior of the XAML view in the WPF Designer for Visual Studio.

You can change the foreground and background colors of elements and attributes displayed in XAML view.

To change XAML syntax highlighting colors

  1. From the Tools menu, select Options.

  2. In the Options dialog box, expand the Environment item.

  3. Select the Fonts and Colors item.

    The font and color options appear.

  4. In the Display items list box, find the entries which have the XAML prefix.

  5. Select the XAML language element which you want to change to a different color.

  6. Set the Item foreground and Item background values to the colors you want to display in XAML view. You can also select the Bold check box if you want the XAML language element to appear in bold face.

    Note Note

    Changes to font style apply to all of the XAML markup.

XAML view provides an auto-formatting feature, which enables uniform spacing and line break structure for XAML markup. To auto-format your XAML markup, press CTRL+KD when XAML view is open.

To change XAML auto-formatting options

  1. From the Tools menu, select Options.

  2. In the Options dialog box, expand the Text Editor item.

  3. Expand XAML.

  4. Expand Formatting.

  5. Under Formatting, select General or Spacing.

    The formatting options appear.

  6. Set the formatting options according to your preferences. For more information, see Options, Text Editor, XAML, Formatting.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft