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 8795667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:26:19+00:00 2026-06-13T23:26:19+00:00

I have the following XAML <ProgressBar Grid.Column=0 Grid.Row=0 Margin=0,1 Minimum=0 Maximum=100 Value={Binding Progress}> <ProgressBar.Resources>

  • 0

I have the following XAML

<ProgressBar Grid.Column="0" Grid.Row="0" Margin="0,1" Minimum="0" Maximum="100" Value="{Binding Progress}">
    <ProgressBar.Resources>
        <Style TargetType="{x:Type ProgressBar}">
            <Style.Triggers>
                <DataTrigger Binding="{Binding DidAllServicesRestart}" Value="False">
                    <Setter Property="Foreground" Value="DarkRed"/>
                    <Setter Property="Value" Value="100"/>
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </ProgressBar.Resources>
</ProgressBar>

The DataTrigger works great for setting Foreground to DarkRed, but setting the value of the progressbar to 100 does not work. I’m guessing because the {Binding Progress} overrides it?

How can I work around this?

  • 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-13T23:26:20+00:00Added an answer on June 13, 2026 at 11:26 pm

    You’re right that the {Binding Progress} overrides it. In the Dependency Property order of precedence, the local value has the 3rd highest priority, whereas the style triggers are 6th.

    3) Local value. A local value might be set through the convenience of the “wrapper” property, which also equates to setting as an attribute or property element in XAML, or by a call to the SetValue API using a property of a specific instance. If you set a local value by using a binding or a resource, these each act in the precedence as if a direct value was set.

    ….

    6) Style triggers. The triggers within styles from page or application (these styles might be either explicit or implicit styles, but not from the default styles, which have lower precedence).

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

Sidebar

Related Questions

I have the following xaml with all the binding removed; <StackPanel Grid.Row=2 Grid.Column=1 Orientation=Horizontal
I have the following XAML inside a 4 Row by 2 column grid. The
I have the following XAML: <ListBox HorizontalAlignment=Left Margin=0,6,0,10 Name=listBox1 Width=468 ItemsSource={Binding} Grid.ColumnSpan=1> <ItemsControl.ItemTemplate> <DataTemplate>
I have the following XAML markup in a WPF DataGrid: <DataGrid ItemsSource={Binding ResultList} Grid.ColumnSpan=4
I have the following xaml, <RichTextBox Name=RichTextBoxPostContent Margin=0 Padding=8,8,8,0 IsReadOnly=True Foreground={x:Null} Xaml={Binding Path=PostContent}/> and
I have the following XAML: <TextBlock Text={Binding ElementName=EditListBox, Path=SelectedItems.Count} Margin=0,0,5,0/> <TextBlock Text=items selected> <TextBlock.Style>
I have the following xaml: <DockPanel> <DockPanel.Resources> <Style TargetType=Button> <Style.Triggers> <Trigger Property=IsMouseOver Value=True> <Setter
I have the following XAML: <Grid x:Name=root> <Grid.RowDefinitions> <RowDefinition Height=*/> <RowDefinition Height=Auto/> </Grid.RowDefinitions> <Grid.Resources>
I have the following XAML: ... <ListBox Name =RoomsListBox Height=100 HorizontalAlignment=Left Margin=12,41,0,0 VerticalAlignment=Top Width=120></ListBox>
I have the following XAML: <Grid> <Grid.RowDefinitions> ... </Grid.RowDefinitions> <DataGrid Grid.Row=0 ...> <DataGrid.Columns> ...

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.