[英]is there any way to know the position of my cursor - in TextBox control?
[英]Cursor position in xaml textbox control
要使TextBox中的文本居中,请使用TextBox的VerticalContentAlignment属性。
<TextBox Text="The text" Height="40" VerticalContentAlignment="Center" />
我添加了Padding =“8,3,0,0”,它将光标设置在中间(作为解决方法)如果有人有更好的idia我会很乐意听到它:)
此解决方案将光标设置在中间,但文本现在不居中...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.