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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:22:52+00:00 2026-05-20T12:22:52+00:00

I am wondering if any simple technique to run storyboard if textblock text string

  • 0

I am wondering if any simple technique to run storyboard if textblock text string was changed. Thank you in advance!

  • 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-20T12:22:53+00:00Added an answer on May 20, 2026 at 12:22 pm

    Below is xaml for a user control that will animate the opacity of an item when the Text property of a TextBlock is changed.

    It is using a PropertyChangedTrigger and ControlStoryboard action to cause this to happen. These items come from dlls that get installed with Blend, but you can install them separately if you don’t have Blend: Blend 4 SDK

    <UserControl
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
        xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
        x:Class="TextboxAnimation.MainPage"
        Width="640" Height="480">
        <UserControl.Resources>
            <Storyboard x:Name="AnAnimation">
                <DoubleAnimationUsingKeyFrames
                    Storyboard.TargetProperty="(UIElement.Opacity)"
                    Storyboard.TargetName="animationTextBlock">
                    <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </UserControl.Resources>
    
        <StackPanel x:Name="LayoutRoot" Background="White">
            <TextBlock x:Name="textBlock"
                HorizontalAlignment="Left" Text="Click Me To Change Text"
                MouseLeftButtonDown="TextBlockClicked">
                <i:Interaction.Triggers>
                    <ei:PropertyChangedTrigger Binding="{Binding Text, ElementName=textBlock}">
                        <ei:ControlStoryboardAction Storyboard="{StaticResource AnAnimation}"/>
                    </ei:PropertyChangedTrigger>
                </i:Interaction.Triggers>
            </TextBlock>
            <TextBlock
                x:Name="animationTextBlock"
                Text="Animate Me!" Margin="0,8,0,0" Opacity="0"/>
        </StackPanel>
    </UserControl>
    

    Here is the code behind that is used for the click event, which changes the TextBlock Text property:

    int times = 0;
    
    private void TextBlockClicked(object sender, System.Windows.Input.MouseButtonEventArgs e)
    {
        times++;
    
        textBlock.Text = String.Format("I've been clicked and changed {0} times!", times);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm wondering if there are any simple ways to get a list of all
I was wondering if there are any performance differences when using simple queries as:
I am wondering if there is a simple snippet which converts links of any
I am wondering if there is any simple tool within Cocos for automatically determining
i was wondering if there was any simple way around sorting tuples in lists
Hi I was wondering is there any simple example of implementing a high score
I was wondering if there were any simple examples that did the following *
I was wondering if there was any simple way to authenticate Openfire users against
I am wondering any efficient way to hide our Silverlight code. I know there
Just wondering if any of you guys know of any web-based/browser-based employee scheduling software/tools?

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.