EB似乎忽略了字体更改 - 也就是固定与浮动问题 [英] EB seems to be ignoring font changes - also, fixed vs float issue

查看:57
本文介绍了EB似乎忽略了字体更改 - 也就是固定与浮动问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是EB的新手,但我正在开发一个WPF应用程序。我添加了一个文本框并添加了字体拉伸(额外扩展)和全部大写。我使用GUI完成了这个,但是当我看到xaml时,一切看起来都很好。

I'm very new to EB but I'm working on a WPF app. I've added a Text Box and added font stretch (extra expanded) and all upper case. I did this using the GUI but when I look at the xaml, all appears to be well.

XAML:

< TextBox Horizo​​ntalAlignment =" ;左"余量= QUOT; 18,5,0,0" TextWrapping = QUOT;包覆与QUOT;文本= QUOT;会计与QUOT;宽度= QUOT; 203"字号= QUOT; 24英寸; FontFamily =" / video_player; component / Fonts /#Segoe UI" fontWeight设置= QUOT;粗体"背景= QUOT;#FF0F0F10"前景= QUOT;#FFFEFEFE" BorderBrush = QUOT;黑色"
高度="37" VerticalAlignment = QUOT;陀螺" FontStretch = QUOT; ExtraExpanded" CharacterCasing =" Upper">

<TextBox HorizontalAlignment="Left" Margin="18,5,0,0" TextWrapping="Wrap" Text="Accounting" Width="203" FontSize="24" FontFamily="/video_player;component/Fonts/#Segoe UI" FontWeight="Bold" Background="#FF0F0F10" Foreground="#FFFEFEFE" BorderBrush="Black" Height="37" VerticalAlignment="Top" FontStretch="ExtraExpanded" CharacterCasing="Upper"/>

 

但是当我看到它时,字体没有展开,而且是大小写,这是我打字的方式。由于xaml看起来正确,我无法想象有什么问题。

But when I look at it, the font is not expanded and it's mixed case, which is how I typed it. Since the xaml looks right, I can't imagine what's wrong.

 

任何输入?

另外,我有一个带分隔符的网格布局(我认为这是正确的术语)然后我有一个填充该区域的矩形。矩形被锁定。当我运行应用程序时,矩形的大小保持不变,但它不会固定在顶部,而b $ b是我想要的地方。

Also, I have a grid layout with a divider (I think that's the right term) and then I have a rectangle filling that area. The rectangle is locked. When I run the app, the size of the rectangle stays the same, but it's not staying pinned to the top, which is where I want it.

 

谢谢!

 

推荐答案

我相信您正在使用的字体需要支持FontStretch和CharacterCasing。这个页面讨论了这个问题:

I believe FontStretch and CharacterCasing need to be supported by the font you are using. This page has some discussion about the issue:

http://stackoverflow.com/questions/2948290/why-fontstretch-does-not-work-in-wpf

 

对于矩形,如果不希望基于边距移动它,则可能需要将Horizo​​ntalAlignment设置为Left,VerticalAlignment设置为top。

For the rectangle, you might need to set HorizontalAlignment to Left and VerticalAlignment to top if you don't want it to be moved based on margins.


这篇关于EB似乎忽略了字体更改 - 也就是固定与浮动问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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