What do you understand by Content Alignment in WPF?

devquora
devquora

Posted On: Feb 22, 2018

 

In WPF, various properties are used while dealing with the content of content controls. The two properties are as follows:

Horizontal Content Alignment, and

Vertical Content Alignment

The parent class of all controls in WPF defines all the properties in System.Windows.Controls.Control class that is.
If we create a TextBox control and a UI with a Button, the UI looks like the following figure where the default vertical and horizontal alignment of the content of a Button is center. The default horizontal and vertical alignment of the content of a TextBox is left and top.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    WPF interview questions

    What is WPF and its advantages?

    WPF denotes Windows Presentation Foundation, which is a re-invention of a UI that uses WPF for Desktop applications. Jus..

    WPF interview questions

    What is the value converter in WPF?

    A Value Converter is known to function as a bridge between a source and a target that is necessary when a target is boun..

    WPF interview questions

    What is the need of WPF when we had windows forms?

    The need for WPF can be better be understood with A-G that is,A – Anywhere execution (Windows or Web) B – Bindings..