O'Reilly logo

Windows Application Development Cookbook by Marcin Jamro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Animating the showing of controls

By default, controls added to a page are visible just after you open it. However, it is possible to enhance the attractiveness of the user interface by adding simple animations for showing controls while the page is being opened. In this recipe, you will learn how to add the entrance transition to a text block.

Getting ready

To step through this recipe, you need only the automatically generated project.

How to do it...

Apply a transition (EntranceThemeTransition) to the text block by modifying the content of the MainPage.xaml file, as follows:

    <Page (...)> 
        <Grid> 
            <TextBlock Text="Hello! :-)" (...)> 
                <TextBlock.Transitions> <TransitionCollection> <EntranceThemeTransition /> </TransitionCollection> </TextBlock.Transitions> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required