hap*_*497 1 windows-phone windows-phone-8.1
如何在Windows手机中更改Indeterminate ProgressBar的颜色?我尝试将背景和边框画笔设置为null并将前景更改为黑色:
<ProgressBar Minimum="0" Maximum="100" IsIndeterminate="True" Foreground="Black" Background="{x:Null}" BorderBrush="{x:Null}"/>
Run Code Online (Sandbox Code Playgroud)
但是当我运行它时,它仍然是蓝色的,因为动画点在屏幕上移动.
Chu*_*are 10
你需要改变 <Style>
文档大纲>右键单击进度栏>编辑模板 - >编辑副本
寻找
<Rectangle x:Name="E1" Fill="{ThemeResource ProgressBarIndeterminateForegroundThemeBrush}"/>
Run Code Online (Sandbox Code Playgroud)
将填充更改为您喜欢的任何颜色
重复矩形E2,E3,E4,E5
或者,如果你可以覆盖 ProgressBarIndeterminateForegroundThemeBrush
在App.xaml中,就像这样
<Application.Resources>
<SolidColorBrush x:Key="ProgressBarIndeterminateForegroundThemeBrush" Color="Yellow" />
</Application.Resources>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2702 次 |
| 最近记录: |