Vertical Align in WPF TextBox

前端 未结 4 1389
灰色年华
灰色年华 2021-02-06 20:55

I have 2 TextBoxes in my wpf app, one for user name and other for password, both have FontSize=20, but the text appears like this:

4条回答
  •  没有蜡笔的小新
    2021-02-06 21:44

    Adjust the Padding properties of these controls, e.g. Padding="0":

      
    
    

    Or, don't set the Height properties, and instead let the controls size themselves automatically based on the height of their content:

    
    
    

提交回复
热议问题