从进度条中去除光泽? [英] Removing gloss from progressbar?

查看:25
本文介绍了从进度条中去除光泽?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以有人建议我使用 WPF 表单为我的应用程序制作自定义 UI.我想尝试的第一件事是更改进度条的外观.唯一让我对它的新外观望而却步的是它顶部的光泽效果.我希望进度条主要由纯色制成.有没有办法去除进度条的光泽部分?

So I was suggested to use WPF forms to make a custom UI for my applications. The first thing I wanted to try was to change the look of the progress bar. The only thing holding me back from it's new look atis the glossy effect over the top of it. I want the progrss bar to be made of mostly solid colours. Is there anyway to remove the glossy part of the progress bar?

此处显示:

谢谢.

推荐答案

Nasreddine 的回答非常好,但如果你想要更简单的东西,你可以使用以下内容

Nasreddine answers is very good but if you want something simpler you can use the following

    <Style TargetType="{x:Type ProgressBar}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ProgressBar">
                    <Border BorderBrush="#D9DCE1" BorderThickness="1" Background="#E8E8E8" CornerRadius="0" Padding="0">
                        <Grid x:Name="PART_Track">
                            <Rectangle x:Name="PART_Indicator" HorizontalAlignment="Left" Fill="#FF49A3E1" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

这篇关于从进度条中去除光泽?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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