【发布时间】:2011-11-23 02:09:29
【问题描述】:
我正在尝试使用 WPF 中的颜色和表单的背景颜色。不做任何其他事情(没有代码后面,从另一个类派生等),我创建了一个全新的默认 Windows 窗体。我将背景更改为浅蓝色。保存表格。运行程序并打开该表单。该表单以其他更深的颜色显示,就像它甚至不尊重
的 XAML<Window x:Class="MyProjectNamespace.AnotherWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="AnotherWindow" Height="300" Width="300" Background="#4800A8A6">
<Grid>
</Grid>
</Window>
此外,如果我尝试使用 #4800A8A6 的相同背景值并尝试创建画笔并执行 BrushConverter.ConvertFrom("#4800A8A6"); 并运行表单,我仍然得到设计器显示的不正确的颜色......什么给了......
【问题讨论】:
-
更改显示器的倾斜度:P
-
@the_ajp...可爱...或者我妻子可能会说...你的眼镜干净吗?但它们仅用于阅读 10 英寸内的内容,而我的显示器距离 2 英尺以上...... :)
标签: c# wpf xaml background brushes