wpf缩放到textBox,当我单击textBox时textBox不能显示光标 [英] wpf scale to textBox, textBox can not display cursor when i click textBox

查看:215
本文介绍了wpf缩放到textBox,当我单击textBox时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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆