Repeat EntranceThemeTransition

I have a simple TabControl made using the RadioButtons and Grids templates that change visibility when IsChecked changes to RadioButton, something like this:

<Grid Name="TabGrid"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*" /> </Grid.RowDefinitions> <StackPanel Grid.Row="0" Orientation="Horizontal"> <RadioButton x:Name="RadioButton1" Content="Latest" Style="{StaticResource TabRadioButtonStyle}" IsChecked="True" GroupName="G1"/> <RadioButton x:Name="RadioButton2" Content="Popular" Style="{StaticResource TabRadioButtonStyle}" IsChecked="False" GroupName="G1" Margin="30,0,0,0" /> </StackPanel> 

Now each grid inside has an EntranceThemeTransition, something like this:

  <GridGrid.Row="1" Visibility="{Binding ElementName=RadioButton1, Path=IsChecked, Converter={StaticResource BoolToVisibilityConverter}}"> <Grid.ChildrenTransitions> <TransitionCollection> <EntranceThemeTransition /> </TransitionCollection> </Grid.ChildrenTransitions> 

As I understand it, EntranceThemeTransition is displayed only when the elements are first displayed. Is there a way to make EntranceThemeTransition repeat every time the mesh visibility changes?

+8
windows-8 winrt-xaml
source share
1 answer

This doesn't exactly answer your questions, but I think it will help many people to land here:

If you want to repeat the input animation for the items in the data list, I found only one way to do this:

  • Set the DataContext of the list to null (this removes the items).
  • Set the DataContext of the list to your list / observable collection (this recreates the elements and adds them to the animation list).

Going to the DataContext, you create new list items, and they are not marked as entered in the view.

Regarding your question; I think you will need to create a new version of the grid in order to play the input animation again.

0
source share

All Articles