Windows7中标签中的文本被截断 [英] Text in label is cutoff in Windows7
问题描述
我正在使用WPF和Visual Studio 2008开发应用程序.我几乎没有带有文本的标签.在我的Xp Sp3开发机器上看起来很棒.但是,当我在Window7上安装该应用程序时,字体看起来有点大,并且标签中的文本被截断了.这是我的标签的XAML代码
Hi, < 标签 HorizontalAlignment =左"
I am developing an application using WPF with Visual Studio 2008. I have few labels with some text. It looks great on my development machine which is Xp Sp3. But when I installed the application on Window7, the font looked little bit big and text is cutoff in the labels. Here is my XAML code for the label
我使用了默认的字体大小和类型.
谢谢您,
Suresh
<Label HorizontalAlignment="Left" Margin="5,0,0,10" Name="label3" Width="120" Height="28" VerticalAlignment="Bottom" >Common Folder:</Label>
I took the default font size and type.
Thank you,
Suresh
推荐答案
您不应明确设置标签的宽度和高度.文本大小可以并且确实会从一个系统更改为另一个系统,因此,应使用适当的容器让布局自然流畅.
You should not be setting the width and height of your label explicitly. Text sizes can and do change from one system to another, so you should let your layout flow naturally by using appropriate containers.
这篇关于Windows7中标签中的文本被截断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!