Split the progress Bar

5 posts, 0 answers
  1. Sreeju
    Sreeju avatar
    4 posts
    Member since:
    Dec 2010

    Posted 27 Dec 2010 Link to this post

    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

     

  2. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 29 Dec 2010 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Sreeju
    Sreeju avatar
    4 posts
    Member since:
    Dec 2010

    Posted 29 Dec 2010 Link to this post

    Thank you very much for the great help
  5. Sreeju
    Sreeju avatar
    4 posts
    Member since:
    Dec 2010

    Posted 30 Dec 2010 Link to this post

    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
  6. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 30 Dec 2010 Link to this post

    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
Back to Top
UI for WPF is Visual Studio 2017 Ready