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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:59:44+00:00 2026-06-05T04:59:44+00:00

I want to create a datatrigger that makes my page blink (from transparent to

  • 0

I want to create a datatrigger that makes my page blink (from transparent to red). So I created a DataTrigger that listens to a boolean flag within my viewmodel. This flag shall indicate whenever the user needs to be reminded. In that case, my page shall blink from transparent to red.

I was pretty sure that I have implemented the data trigger in a correct manner, but my app does nothing – no error, no blinking… So I must have something missed.

<Style x:Key="ReminderPage" TargetType="{x:Type ViewTemplates:TpApplicationBarView}" BasedOn="{StaticResource TpApplicationBarViewStyle}">
    <Style.Triggers>

        <!-- Reminder animation, when the time comes to remind the user -->
        <DataTrigger Binding="{Binding IndicateReminderAnimation}" Value="True">
            <DataTrigger.EnterActions>
                <BeginStoryboard>
                    <Storyboard x:Name="Blink">
                        <ColorAnimation Storyboard.TargetProperty="(Background).(SolidColorBrush.Color)" 
                                        AutoReverse="True" 
                                        From="Transparent" 
                                        To="Red" 
                                        Duration="0:0:1" 
                                        RepeatBehavior="Forever">
                        </ColorAnimation >
                    </Storyboard>
                </BeginStoryboard>
            </DataTrigger.EnterActions>
        </DataTrigger>

        <DataTrigger Binding="{Binding IndicateReminderAnimation}" Value="False">
            <DataTrigger.EnterActions>
                <BeginStoryboard>
                    <Storyboard>
                        <ColorAnimation Storyboard.TargetProperty="(Background).(SolidColorBrush.Color)" 
                                        AutoReverse="False" 
                                        To="Transparent" 
                                        Duration="0:0:1">
                        </ColorAnimation >
                    </Storyboard>
                </BeginStoryboard>
            </DataTrigger.EnterActions>
        </DataTrigger>
    </Style.Triggers>
</Style>

So, what do I have done wrong?

Update: I can see the following message in the output window:

System.Windows.Media.Animation Warning: 6 : Unable to perform action because 
the specified Storyboard was never applied to this object for interactive control.;        
Action='Stop'; Storyboard='System.Windows.Media.Animation.Storyboard'; 
Storyboard.HashCode='61356140'; Storyboard.Type='System.Windows.Media.Animation.Storyboard'; 
TargetElement='System.Windows.Media.Animation.Storyboard'; TargetElement.HashCode='61356140'; 
TargetElement.Type='System.Windows.Media.Animation.Storyboard'

Update2: After googling arround I found out, that it is a problem with the UI Thread. So I made a dispatcher call whenever I set the bound property. But even with this trick, there’s no color animation. But the error in the output window seems to be vanished. So, I’m searching for further ideas on how to fix the animation.

Update3: It seems to be a general problem setting the background color of the page. But it’s really strange. The Page is placed in a NavigationFrame. Setting the background color of the navigation frame will change the color of the application, but setting the background color of the page (even without any animation) won’t change anything.

  • 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-05T04:59:46+00:00Added an answer on June 5, 2026 at 4:59 am

    I found the bug – or better the two bugs.

    1.) It seems not be possible to change the background color of a page that is placed within a Navigation Frame.

    So first was to move the binding and event to the MainWindow itself (wpf window class)

    2.) The Style that contains the data trigger did not work. After googling around I found a working solution for what I’m searching for.

    <Storyboard x:Key="RemindUser" >
        <ColorAnimation Storyboard.TargetProperty="(Background).(SolidColorBrush.Color)" 
                        AutoReverse="True" 
                        From="Transparent" 
                        To="{StaticResource WinAccentBackgroundColor}" 
                        Duration="0:0:1" 
                        RepeatBehavior="Forever">
        </ColorAnimation >
    </Storyboard>
    
    <Storyboard x:Key="StopRemindUser">
        <ColorAnimation Storyboard.TargetProperty="(Background).(SolidColorBrush.Color)" 
                        AutoReverse="True" 
                        To="Transparent" 
                        Duration="0:0:1">
        </ColorAnimation >
    </Storyboard>
    
    <Style x:Key="ReminderWindow" TargetType="{x:Type Metro:SnappedTransparentWindow}" BasedOn="{StaticResource TransparentWindow}">
        <Style.Triggers>
    
            <!-- Reminder animation, when the time comes to remind the user -->
            <DataTrigger Binding="{Binding IndicateReminderAnimation}" Value="True">
                <DataTrigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource RemindUser}"/>
                </DataTrigger.EnterActions>
                <DataTrigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource StopRemindUser}"/>
                </DataTrigger.ExitActions>
            </DataTrigger>
        </Style.Triggers>
    </Style>
    

    The key was to split the binding and storyboard into different parts.

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

Sidebar

Related Questions

i want create a custom json data from the mssql 2008 results so that
I want create texture atlas(matrix of images) from multiple images.Is their any applescript that
i want create multiple search where statement $where_search is a multiple condition from post
I want create wordpress website into which I want create user management... That means
I want to create a new field (or two) in my table that is
I want to create a Silverlight app to extract and manipulate data from an
i want create a counter that retrieve the number of month, day, hour, minute
I want to create a rectangle glass and a menu exact like that is
I have C# Dictionary and I want create a .csv file from it. For
I want create a cache so that when an item doesn't exist, only one

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.