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

  • Home
  • SEARCH
  • 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 549497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:11:27+00:00 2026-05-13T11:11:27+00:00

I´m creating a XAML template for the WPF ProgressBar . The following XAML code

  • 0

I´m creating a XAML template for the WPF ProgressBar. The following XAML code works fine if IsIndeterminate is set to False:

<ControlTemplate x:Key="DefaultProgressBarTemplate" TargetType="{x:Type ProgressBar}">
    <ControlTemplate.Resources>
        <SolidColorBrush x:Key="SolidBorderBrush" Color="#767676" />
        <LinearGradientBrush x:Key="IndicatorBrush" StartPoint="0,0" EndPoint="1,0">
            <LinearGradientBrush.GradientStops>
                <GradientStop Color="#BCCF64" Offset="0.5" />
                <GradientStop Color="#E1FF77" Offset="0.0" />
            </LinearGradientBrush.GradientStops>
        </LinearGradientBrush>
    </ControlTemplate.Resources>
    <Grid MinHeight="14">
        <Border Name="PART_Track" CornerRadius="9" Background="Transparent" BorderBrush="{StaticResource SolidBorderBrush}" BorderThickness="1" SnapsToDevicePixels="True" />
        <Border Name="PART_Indicator" CornerRadius="9" Background="{StaticResource IndicatorBrush}" BorderBrush="{StaticResource SolidBorderBrush}" BorderThickness="1" HorizontalAlignment="Left" SnapsToDevicePixels="True" />
    </Grid>
</ControlTemplate>

<Style x:Key="{x:Type ProgressBar}" TargetType="{x:Type ProgressBar}">
    <Setter Property="OverridesDefaultStyle" Value="True" />
    <Setter Property="Template" Value="{StaticResource DefaultProgressBarTemplate}" />
</Style>

The indicator border fills up the ProgressBar from min to max. But if I set IsIndeterminate to True the indicator border fills up the entire ProgressBar (like it is set to max) and nothing is animated at all. Nothing I tried did change this behaviour of the ProgressBar.
What do I have to do to have an IsIndeterminate animation similar to the one in the standard WPF ProgressBar?

Thanks in advance

banzai

  • 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-05-13T11:11:27+00:00Added an answer on May 13, 2026 at 11:11 am

    ProgressBar is designed to show the entire indicator when IsIndeterminate="true". WPF’s built in ProgressBar styles actually replace the indicator color with an animated brush whenever IsIndeterminate="true" to cause the effect you are observing. You could do the same. Just use a property trigger on IsIndeterminate="true" and set the brush to a brush whose colors you are animating. Another option would be to create a separate animation triggered by IsIndeterminate="true" if you wanted a different effect.

    You can look at the built-in styles by using the NET Reflector tool along with its BamlViewer add-in. The original source files are also copied onto your hard disk when Expression Blend is installed, even the evaluation version, so installing Expression Blend is another way to see the XAML for the built-in styles. Just look in the C:\Program Files\Microsoft Expression\Blend 2\SystemThemes directory.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When creating a control style & template in Blend for a WPF application, I
I have the following, very easy to reproduce problem: I'm creating a xaml application
I have seen many examples of creating a WPF Toolkit DataGrid in XAML and
I'm creating Windows application and Class library. Class library contains WPF control named InsertForm.xaml
In XAML I have the following code: <Label Width=120 Height=20 Name=label1 SnapsToDevicePixels=True HorizontalAlignment=Left VerticalAlignment=Bottom>
I'm creating dynamic templated XAML designs that I would like to convert to PNG
I'm creating a standalone WPF app with multi-language support. I've found some great resources
I'm working on creating a date/time user control in WPF using C# 2008. My
Can anyone provide the XAML for creating customized check boxes. I have attached the
I am creating a WPF custom control, a Button with an Image and Text

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.