Animation to create a TabItem?

Can a TabItem be animated when it is created? I would like to create an animation that will slide the TabItem from the bottom of my window onto the TabControl itself and add some fade too :)

+2


a source to share


1 answer


The short answer is yes. You can bind animation to a routed event Loaded

as shown below.

<TabItem>
    <TabItem.Triggers>
        <EventTrigger RoutedEvent="Loaded">
            <BeginStoryboard>
                    <Storyboard>
                        <!-- animations go here -->
                    </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
    </TabItem.Triggers>
</TabItem>

      



Then you can place any animation you want in Storyboard

to give the effect you want .

+1


a source







All Articles