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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:49:09+00:00 2026-06-10T17:49:09+00:00

I am using MVVm in my WPF application. I am currently playing around with

  • 0

I am using MVVm in my WPF application. I am currently playing around with animating a grid so that when a user selected a particular item in a combobox I want my grid to animate as it expand. I have a property in my View Model that I want to bind to trigger the animation in my grid. How do we do this in MVVM? So far I have recently found a solution using

EventTrigger RoutedEvent ="SampleGridEventName"

is there any way to use other triggers to bind to a property in my ViewModel?Something like

Trigger BlahBlah ="{Binding ExpandGrid}"
  • 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-10T17:49:11+00:00Added an answer on June 10, 2026 at 5:49 pm

    Yes. Style has DataTrigger which also has EnterActions property. Animations are stored in resources. That’s the trick.

    <UserControl x:Class="TriggerSpike.UserControl1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="300" Width="300">
    <UserControl.Resources>
        <DoubleAnimation x:Key="SearchAnimation" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:4"/>
        <DoubleAnimation x:Key="StopSearchAnimation" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:4"/>
    </UserControl.Resources>
    <StackPanel>
        <TextBlock Name="progressWheel" TextAlignment="Center" Opacity="0">
            <TextBlock.Style>
                <Style>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding IsBusy}" Value="True">
                            <DataTrigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <StaticResource ResourceKey="SearchAnimation"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </DataTrigger.EnterActions>
                            <DataTrigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                       <StaticResource ResourceKey="StopSearchAnimation"/> 
                                    </Storyboard>
                                </BeginStoryboard>
                            </DataTrigger.ExitActions>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </TextBlock.Style>
            Searching
        </TextBlock>
        <Label Content="Here your search query"/>
        <TextBox Text="{Binding SearchClause}"/>
        <Button Click="Button_Click">Search!</Button>
        <TextBlock Text="{Binding Result}"/>
    </StackPanel>
    </UserControl>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WPF application using MVVM. I have some user controls that show
In my WPF application using MVVM I noticed that in some cases the CanExecute
I'm using MVVM to bind a ComboBox to an ObservableCollection in my WPF-application. However,
I'm currently introducing Prism to a new Wpf application, and am using the MVVM
I have a WPF application implemented using the MVVM framework that uses an ActiveX
I am currently working on an application using WPF and MVVM. Now if I
I have a WPF application using MVVM that utilises TreeViewItemViewModels to simplify working with
I'm currently learning how to write a WPF application using the MVVM pattern. I'm
I am currently learning MVVM in WPF. I am creating an application that incorporates
I'm using MVVM in my WPF application. I have a Window that has 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.