开发者

Remove the "blockiness" in Progress Bar in WPF

开发者 https://www.devze.com 2023-01-01 09:07 出处:网络
I want to remove the spaces between the blocks sh开发者_开发问答owing the progress. I need it to be solid.

I want to remove the spaces between the blocks sh开发者_开发问答owing the progress. I need it to be solid.

Code:

<ProgressBar Name="probar"  Minimum="0" Height="40"  BorderThickness="0"/>

Geetha


You need to redefine the template of the ProgressBar. Fortunately, it's not very complex... The simplest way is to extract the template with a tool like Style Snooper, the BAML Viewer Reflector Add-in, or Show Me The Template, and change the part that defines the background.

0

精彩评论

暂无评论...
验证码 换一张
取 消