[英]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.