[SOLVED] How to style input text in textbox?

Issue

This Content is from Stack Overflow. Question asked by Penance

I would like to display the text just below, not in the middle of the textbox. How can I do this?

What I have:

What I want:

The first is a textbox, second is textblock

<TextBlock
       Height="16"
       MinWidth="150"
       FontFamily="Monospace"
       FontSize="14"
       Text="Search..."
       FontWeight="Normal"
       HorizontalAlignment="Center"
       VerticalAlignment="Center"
       Margin="3 0 0 0"/>

All I need is to change TextBlock -> TextBox and get the same text display



Solution

Use VerticalContentAlignment="Bottom" in your search <TextBox/>.


This Question was asked in StackOverflow by Penance and Answered by Muhammad Sulaiman It is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?