Home > Back-end >  How to style input text in textbox?
How to style input text in textbox?

Time:09-19

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:
enter image description here

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

CodePudding user response:

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

  •  Tags:  
  • wpf
  • Related