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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:34:19+00:00 2026-06-06T02:34:19+00:00

I am using the MVVM model. I have a dependency property, a boolean, called

  • 0

I am using the MVVM model.

I have a dependency property, a boolean, called “ResultOfUpdate“. It is changed whenever a user tries to run a command.

In the setter for this dependency property I am calling “RaisePropertyChanged()” method on the property name.

It is bound to a DataTrigger like so :

<DataTrigger Binding="{Binding ResultOfUpdate}"  Value="True">
    <DataTrigger.EnterActions>
        <BeginStoryboard>
            <Storyboard>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Opacity)" 
                                               AutoReverse="True">
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0"  Value="0"/>
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.1"  Value="0.1"/>
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.2" Value="0.2"/>
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.3" Value="0.3"/>
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.4" Value="0.4"/>
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.5" Value="0.5"/>
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.6"  Value="0.6"/>
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.7" Value="0.7"/>
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.8" Value="0.8"/>
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.9" Value="0.9"/>
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </BeginStoryboard>
    </DataTrigger.EnterActions>
</DataTrigger>

…

 <TextBlock Style="{StaticResource statusStyle}"  
            Opacity="0" Text="Results updated!"      
            FontSize="10" FontFamily="Segoe UI"/>

I would like for each time this bool is set to true, the storyboard is played.

Confusingly, this storyboard is then triggered correctly the first time the user runs the command, updating the dependecy property to true.

Subsequent attempts have found that the dependency property setter code is entered, and the RaisePropertyChanged() method called – but the storyboard is not played again.

What have I done incorrectly here ?

  • 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-06T02:34:22+00:00Added an answer on June 6, 2026 at 2:34 am

    You could possibly use an event trigger like this:

    <StackPanel>
        <TextBlock Text="I'm a text block" Name="theTextBlock"/>
        <Button Name="BeginButton">Begin</Button>
        <StackPanel.Triggers>
            <EventTrigger RoutedEvent="Button.Click" SourceName="BeginButton">
                <BeginStoryboard Name="MyBeginStoryboard">
                    <Storyboard>
                        <DoubleAnimation
                            Storyboard.TargetName="theTextBlock"
                            Storyboard.TargetProperty="(TextBlock.Opacity)"
                            From="0.0" To="1.0" AutoReverse="True" Duration="0:0:1"/>
                        </Storyboard>
                </BeginStoryboard>
            </EventTrigger>
        </StackPanel.Triggers>
    </StackPanel>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using MVVM (MVVM Light Toolkit) and have a property on the view model
I have a user control called HomePage.xaml . I'm creating a model instance (using
I am using MVVM architecture. I have a usercontrol UC as a View Model
Using MVVM and EF...I have a datagrid binding to a View Model (using ObservableCollection).
I'm using MVVM in WPF in C#.NET. Say I have the following example model:
I'm starting to creat this project using MVVM Model. But I have no idea
I am using MVVM-Light and for every view model I have to create an
I am building a MVVM application. The model / entity (I am using NHibernate)
I am using MVVM pattern and I have one DataGrid with a column which
I'm using MVVM to bind views to objects in a Tree. I have a

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.