wpf缩放到textBox,当我单击textBox时textBox不能显示光标 [英] wpf scale to textBox, textBox can not display cursor when i click textBox
问题描述
首先,我缩放(ScaleTransform) TextBox
,然后鼠标点击 TextBox
。有时可以显示光标,有时不能显示光标。寻找解决问题的解决方案。我希望在缩放 TextBox
后可以显示光标。
First, I Zoom(ScaleTransform) the TextBox
, then mouse to click on the TextBox
. Sometimes can display the cursor, and sometimes can notdisplay the cursor. Looking for a solution to solution to the problem. I hope that I can show the cursor after I scale the TextBox
.
<Grid>
<StackPanel>
<TextBox Width="200"></TextBox>
<TextBox Width="100"></TextBox>
<TextBox Width="300"></TextBox>
<TextBox Width="100"></TextBox>
<TextBox Width="100"></TextBox>
<TextBox Width="100"></TextBox>
</StackPanel>
<Grid.LayoutTransform>
<ScaleTransform ScaleX="0.3" ScaleY="0.65"></ScaleTransform>
</Grid.LayoutTransform>
</Grid>
推荐答案
A TextBox
,特别是 TextBox
,看起来很糟糕,缩小时表现不佳。如果你希望你的 TextBox
看起来不错,并且行为良好,然后使用 FontSize
减少它和你的字体渲染和光标管理会更好。
A TextBox
, especially a TextBox
, is going to look bad and behave badly when scaled down. If you want your TextBox
to look good and behave well, then use FontSize
to reduce it and your font rendering and your cursor management will work better.
这篇关于wpf缩放到textBox,当我单击textBox时textBox不能显示光标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!