Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8390111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:54:01+00:00 2026-06-09T18:54:01+00:00

Progress bar style in WPF is old fashioned. Increments in Bars. How to implement

  • 0

Progress bar style in WPF is old fashioned. Increments in Bars. How to implement a progress bar with vista or windows-7 shady glow effect ?

Image http://quickshare.my3gb.com/download/2.JPG

Even checked out the properties of the Progressbar. But, there is no properties related to glowy effect.

Also, is there any animations or something different from normal progress bar/

Edit

The Code:

<ProgressBar Height="41" HorizontalAlignment="Left"    Margin="372,215,0,0" Name="progressBar1" VerticalAlignment="Top" Width="150">
            
</ProgressBar>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T18:54:03+00:00Added an answer on June 9, 2026 at 6:54 pm

    Roll your own shouldn’t be too hard.

    Create a usercontrol which has the properties of a standard progress bar

    Value
    Maximum
    Minimum
    

    You can create a derived property which calculates the size of the bar by using the a formula:

    ProgressBarWidth = (Value / (Maximum + Minimum) * ControlWidth) - Padding
    

    Which changes when the Value, Maximum or Minimum is updated

    Bind this to the Width of the ‘bar’ in your progress bar control template – this way when the Value property is updated, the progress bar will resize.

    How your bar looks is up to you, but I guess you just want a load of fancy fills/gradients/glow effects – you can add these in Blend

    Disclaimer: Formulas may be incorrect!

    In case you want to try and roll your own, here’s one I just knocked up which seems to work ok

    public partial class MyProgressBar : UserControl
        {
            public MyProgressBar()
            {
                InitializeComponent();
    
                Loaded += new RoutedEventHandler(MyProgressBar_Loaded);
            }
    
            void MyProgressBar_Loaded(object sender, RoutedEventArgs e)
            {
                Update();
            }
    
            private static readonly DependencyProperty MaximumProperty = DependencyProperty.Register("Maximum", typeof(double), typeof(MyProgressBar), new PropertyMetadata(100d, OnMaximumChanged));
            public double Maximum
            {
                get { return (double)GetValue(MaximumProperty); }
                set { SetValue(MaximumProperty, value); }
            }
    
    
            private static readonly DependencyProperty MinimumProperty = DependencyProperty.Register("Minimum", typeof(double), typeof(MyProgressBar), new PropertyMetadata(0d, OnMinimumChanged));
            public double Minimum
            {
                get { return (double)GetValue(MinimumProperty); }
                set { SetValue(MinimumProperty, value); }
            }
    
            private static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(double), typeof(MyProgressBar), new PropertyMetadata(50d, OnValueChanged));
            public double Value
            {
                get { return (double)GetValue(ValueProperty); }
                set { SetValue(ValueProperty, value); }
            }
    
    
    
            private static readonly DependencyProperty ProgressBarWidthProperty = DependencyProperty.Register("ProgressBarWidth", typeof(double), typeof(MyProgressBar), null);
            private double ProgressBarWidth
            {
                get { return (double)GetValue(ProgressBarWidthProperty); }
                set { SetValue(ProgressBarWidthProperty, value); }
            }
    
            static void OnValueChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
            {
                (o as MyProgressBar).Update();
            }
    
            static void OnMinimumChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
            {
                (o as MyProgressBar).Update();
            }
    
            static void OnMaximumChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
            {
                (o as MyProgressBar).Update();
            }
    
    
            void Update()
            {
                // The -2 is for the borders - there are probably better ways of doing this since you
                // may want your template to have variable bits like border width etc which you'd use
                // TemplateBinding for
                ProgressBarWidth = Math.Min((Value / (Maximum + Minimum) * this.ActualWidth) - 2, this.ActualWidth - 2);
    
    
            }          
        }
    

    The XAML

    <UserControl x:Class="WpfApplication1.MyProgressBar"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                 mc:Ignorable="d" 
                 d:DesignHeight="300" d:DesignWidth="300" x:Name="uc">
        <Grid>
            <Border Background="White">
                <Border BorderBrush="Gray" BorderThickness="1">
                    <Grid>
                        <Grid.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FFE5E5E5" Offset="0" />
                                <GradientStop Color="White" Offset="1" />
                            </LinearGradientBrush>
                        </Grid.Background>
                        <Grid Width="{Binding ProgressBarWidth, ElementName=uc}" HorizontalAlignment="Left">
                            <Grid.Background>
                                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                    <GradientStop Color="#FFCBFFD0" Offset="0" />
                                    <GradientStop Color="#FF62EF73" Offset="1" />
                                    <GradientStop Color="#FFAEE56D" Offset="0.39" />
                                </LinearGradientBrush>
                            </Grid.Background>
                        </Grid>
                    </Grid>
                </Border>
            </Border>
        </Grid>
    </UserControl>
    

    The result:

    Progress bar... home grown!

    Like I said, something like this is pretty easy but still consider redefining the template or using the original since it does support glowyness on the right OS

    Here it is after I added a ‘Percent’ dependency property and bound to that in the control template:

    Home grown with number!

    Code for updating Percent was

       Percentage = Math.Min((int)(Value / (Maximum + Minimum) * 100), 100);
    

    Edit 2:

    I messed with the fills and added a white inner border so it looks more shiny. The only thing missing is the shiny animation

    the top one is my control, the bottom one is the default WPF one

    Bear in mind, all of this may be possible just by editing the progress bar control template

    Oooh shiny...

    Here’s the updated XAML:

    <UserControl x:Class="WpfApplication1.MyProgressBar"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                 mc:Ignorable="d" 
                 d:DesignHeight="300" d:DesignWidth="300" x:Name="uc">
        <Grid>
            <Border Background="White" BorderBrush="Gray" BorderThickness="1">
                <Border BorderBrush="White" BorderThickness="1">
                    <Grid>
                        <Grid.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FFE5E5E5" Offset="0" />
                                <GradientStop Color="White" Offset="1" />
                            </LinearGradientBrush>
                        </Grid.Background>
                        <Grid Width="{Binding ProgressBarWidth, ElementName=uc, FallbackValue=200}" HorizontalAlignment="Left">
                            <Grid.Background>
                                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                    <GradientStop Color="#FF8BBA91" Offset="0" />
                                    <GradientStop Color="#FF8BBA91" Offset="1" />
                                    <GradientStop Color="#FF9ED76A" Offset="0.8" />
                                    <GradientStop Color="#FF9ED76A" Offset="0.2" />
                                </LinearGradientBrush>
                            </Grid.Background>
                        </Grid>
                        <Border>
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#89E2E2E2" Offset="0" />
                                    <GradientStop Color="#C1FFFFFF" Offset="0.5" />
                                    <GradientStop Color="Transparent" Offset="0.52" />
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Percentage, ElementName=uc}"></TextBlock>
                    </Grid>
                </Border>
            </Border>
        </Grid>
    </UserControl>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Could anyone tell me how to implement a marquee style progress bar in wxPython?
I'm looking to create a progress bar that doesn't use the WPF default style,
I'm trying to implement a vertical progress bar in WPF and am having some
Is there a way to monitor the loading progress (percent progress bar style) when
I have a marquee style progress bar at some point I want it to
I have the Progress bar div and the asp:label inside it. How to style
I need use a progress bar with the pbstMarquee style, I read this question
I am using css to create a gantt-chart style progress bar. It consists of
I want to show custom dialog like iphone hud progress Bar Style.but,i am no
How can I modify standart style of progress bar controll?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.