更改进度条颜色

编程入门 行业动态 更新时间:2024-10-28 22:29:11
本文介绍了更改进度条颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的进度条颜色非常浅!当我将我的Expression Blend 3项目转换为Expression Blend 4时,发生了这种情况! 不透明度为100%.我认为混合4中的进度条上有一个银色动画.我只是从wpf开始,不知道如何覆盖此样式..我认为有一种方法可以更改前景填充进度条的方式. 现在我有这个

my progress bar colors are very light! This happened when i converted my expression blend 3 project to expression blend 4! The opacity is a 100%. I think there is a silverish animation over the progress bars in blend 4. I am just starting with wpf and don''t know how to override this style.. i think there is a way to change how the foreground fills in the progress bar. right now i have this

<progressbar x:name="Pbar2" margin="82,80,30,0" verticalalignment="Top" height="16" foreground="Red" valuechanged="UpdateTextBlock2" borderbrush="{x:Null}" removed="{x:Null}" xmlns:x="#unknown" />

但是红色很淡..上面有银色的光使它变光..还有一个动画类型的东西在进度条中进行..这种小光一直在里面移动..还有什么方法可以禁用它吗? 感谢您的帮助!

but the red color is very light..there is a silverish glow over it which makes it light..and also there is a animation type thing that goes on in a progress bar..that small glow that keeps moving inside..Is there any way to disable that as well? thank you for ur help!!

推荐答案

您可以为进度栏设置模板.这是Microsoft示例页面中的一些代码. msdn.microsoft/en-us/magazine/cc163497.aspx#S4 [ ^ ] You can setup a template for the progressbar. Here is some code from a Microsoft example page. msdn.microsoft/en-us/magazine/cc163497.aspx#S4[^] <ProgressBar Margin="50" HorizontalAlignment="Center" Value="{Binding ElementName=scroll, Path=Value}"> <ProgressBar.Template> <ControlTemplate> <StackPanel> <Rectangle Name="PART_Track" Height="20" Width="300" Fill="Red" /> <Rectangle Name="PART_Indicator" Height="20" Fill="Blue" /> </StackPanel> </ControlTemplate> </ProgressBar.Template> </ProgressBar>

更多推荐

更改进度条颜色

本文发布于:2023-11-09 03:01:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1571212.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:进度条   颜色

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!