How to: Align to Both Text Baselines and Margins

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

The WPF Designer for Visual Studio displays snaplines to help you align WPF controls. The WPF Designer also displays snaplines to help you align the text baselines of text-based WPF controls. You can use snaplines to align the text baselines of the following WPF controls: Button, CheckBox, ComboBox, GroupBox, Label, ListBox, TextBox, TextBlock, RadioButton, and RichTextBox.

To align edges of controls

  • On a window with at least two controls, drag or resize one of the controls so that the edge is aligned with another control. When the edges are aligned, a snapline appears indicating alignment. When snaplines appear, you will also see a number near the snapline that changes as you drag the control. The number indicates the distance between the edge of the current control and the edge of the other control."

To align text baselines of text-based controls

  • On a window with at least two text-based controls listed earlier in this topic, drag one of the text-based controls so that the text baseline is aligned with the text baseline of another text-based control. When the text baselines are aligned, a snapline appears indicating alignment.

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