Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > ProgressBar > Split the progress Bar

Not answered Split the progress Bar

Feed from this thread
  • Sreeju avatar

    Posted on Dec 27, 2010 (permalink)

    Hi,

    I want to split the progress bar. i.e Upto particular point i want one color, remaining will be another color.

    For example with following code

    <

     

     

    telerik:RadProgressBar x:Name="pb" Width="220" Height="15" Minimum="0" Maximum="100" Value="10" Margin="40,4,0,4" />

     

     

     

    Upto say value=30 i want grey color and above that point i need default color.

    Please suggest/provide sample code.

    Regards

    Sreeju

     

    Reply

  • Alex Fidanov Alex Fidanov admin's avatar

    Posted on Dec 29, 2010 (permalink)

    Hello Sreeju,

    You can use a combination of the SkipValue and Value properties to achieve this. When the Value is less than 30, you can set the foreground of the progress bar to gray. When the value becomes greater than 30, you can set the SkipValue to 30 and start incrementing the value from 0. Then you can set the Background of the progressbar with a gradient so that only the first 30% of the background is gray and the rest is the default color. I have put together and attached a small project of the suggested approach.

    Regards,
    Alex Fidanov
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF

    Reply

  • Sreeju avatar

    Posted on Dec 29, 2010 (permalink)

    Thank you very much for the great help

    Reply

  • Sreeju avatar

    Posted on Dec 30, 2010 (permalink)

    Hi,

    I need to draw a line at skip value point. For example suppose SKipValue = 20, i need to draw line at point 20.

    Please suggest/provide sample code.

    Thanks & Regards

    Sreeju

    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Dec 30, 2010 (permalink)

    Hi Sreeju,

    Please find the attached solution where I`ve edited the control Template of the RadProgressBar and added an additional Rectangle. Hope this satisfies your needs.

    Kind regards,
    Petar Mladenov
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > ProgressBar > Split the progress Bar
Related resources for "Split the progress Bar"

WPF ProgressBar Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]