【发布时间】:2011-09-01 03:02:28
【问题描述】:
编辑:我解决了我的问题...看看我的答案。有错就更正。谢谢。
问题:由于某种原因,WPF 应用程序中的进度条似乎没有显示我需要的颜色。
这是 XAML 代码:
<Window x:Class="TaskbarProgressApp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Window.TaskbarItemInfo>
<TaskbarItemInfo />
</Window.TaskbarItemInfo>
<Grid>
<ProgressBar x:Name="ProgressBar"
Margin="10"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Height="23" Background="{x:Null}" Foreground="DarkRed">
</ProgressBar>
</Grid>
</Window>
结果如下:
在我看来不像深红色...每种颜色都有:(
有什么想法吗?
【问题讨论】:
-
如果你有的话,你可能想edit the template from Expression Blend。
-
对不起,我是个菜鸟,但我该如何编辑/使用控件模板?我没有 Expression Blend。
-
您可以在没有它的情况下创建、编辑和使用控制模板。它只是提供了方便的功能来查看自动应用的现有控件模板。还有一个类似用途的免费工具described on this page, called Dump Control Template。
-
我解决了我的问题。发布答案。
标签: .net wpf progress-bar