呈现自定义“MenuItem”时出现问题
这是我的问题:
当我在计算机中打开程序时,选项菜单呈现如下: http://img811.imageshack.us/img811/1623/prob1.jpg
但是当我用我的父亲的计算机和我的兄弟的计算机打开程序时,MenuItem 呈现如下: http://img203.imageshack.us/img203/3451/prob2l.jpg
正如您所看到的,在我的计算机中它将文本呈现为黑色,而在其他计算机中则将文本呈现为白色。
这是我的代码:
<Separator>
<Separator.Template>
<ControlTemplate>
<Border CornerRadius="2" Padding="5" Background="PaleGoldenrod" BorderBrush="Black" BorderThickness="1">
<TextBlock Text="Global Options (Are Saved):" FontWeight="Bold" />
</Border>
</ControlTemplate>
</Separator.Template>
</Separator>
Here's my problem:
when i open my program in my computer the option menu is rendered like this:
http://img811.imageshack.us/img811/1623/prob1.jpg
but when i open my program with my father's computer and my brother computer the MenuItem renders out like this:
http://img203.imageshack.us/img203/3451/prob2l.jpg
as you can see in my computer it renders the text in black and in others computer renders the text in white.
Here's my code:
<Separator>
<Separator.Template>
<ControlTemplate>
<Border CornerRadius="2" Padding="5" Background="PaleGoldenrod" BorderBrush="Black" BorderThickness="1">
<TextBlock Text="Global Options (Are Saved):" FontWeight="Bold" />
</Border>
</ControlTemplate>
</Separator.Template>
</Separator>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过将 texblock 前景设置为黑色? (也许 Vista / 7 默认为黑色,而 XP 没有,强制其为黑色可能会有所帮助)
Have you tried setting the texblock foreground to Black? (Perhaps Vista / 7 has Black as default while XP does not, forcing it to be black might help)