如何使用线性梯度刷实现WPF圆形进度栏
如何通过以下线性梯度刷实现WPF圆形进度杆:
<LinearGradientBrush x:Key="LinearGradientProgressBrush">
<GradientStop Color="Yellow" Offset="0"/>
<GradientStop Color="Red" Offset="0.25"/>
<GradientStop Color="Green" Offset="0.50"/>
<GradientStop Color="Blue" Offset="0.75"/>
</LinearGradientBrush>
随着圆形进度杆的前进,颜色需要在ARC的末端变化,而先前的ARC颜色保持不变。换句话说,蓝色不会开始绘制,直到圆形进度杆达到75%。
How do I implement a WPF circular progress bar with the following linear gradient brush:
<LinearGradientBrush x:Key="LinearGradientProgressBrush">
<GradientStop Color="Yellow" Offset="0"/>
<GradientStop Color="Red" Offset="0.25"/>
<GradientStop Color="Green" Offset="0.50"/>
<GradientStop Color="Blue" Offset="0.75"/>
</LinearGradientBrush>
As the circular progress bar advances, the color needs to change at the end point of the arc, with previous arc colors staying the same. In other words, the Blue color wont start being painted until the circular progress bar gets to 75%.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论