Applying Theme Transitions to Elements
So how do you apply a theme transition to an element? Every UIElement
has a Transitions
property that can be set to a collection of Transition
objects (the base class for all theme transitions). Using one of the theme transitions called EntranceThemeTransition
as an example, the following XAML applies one to a Button
on a Page
:
<Page ...> <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <Button Content="A Button with a Theme Transition"> < Button.Transitions > < TransitionCollection> < EntranceThemeTransition/> </ TransitionCollection> </ Button.Transitions> </Button> </Grid> </Page>
When this Page ...
Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.