locked
XAML Transition issue when NavigationCacheMode is enabled

    Question

  • I am using EntranceThemeTransition in my Win 8 RT app with NavigationCacheMode Enabled. The transition is working fine When I navigate to the page first time, but when I go back and again navigate to that page then the transition is not working. 
    Thursday, March 27, 2014 9:40 AM

Answers

  • Hi,

    There is not enough information to detect why your problem occurs. You should upload your project into SkyDrive so that we can test it. And I think you can code EntranceThemeTransition like below, so the animation can play whenever the NavigationCacheMode set to Enabled or Disabled:

    <ItemsControl Grid.Row="1" x:Name="rectangleItems">
                <ItemsControl.ItemContainerTransitions>
                    <TransitionCollection>
                        <EntranceThemeTransition/>
                    </TransitionCollection>
                </ItemsControl.ItemContainerTransitions>
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <WrapGrid Height="400"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
    
                <!-- The sequence children appear depends on their order in 
             the panel's children, not necessarily on where they render
             on the screen. Be sure to arrange your child elements in
             the order you want them to transition into view. -->
                <ItemsControl.Items>
                    <Rectangle Fill="Red" Width="100" Height="100" Margin="10"/>
                    <Rectangle Fill="Red" Width="100" Height="100" Margin="10"/>
                    <Rectangle Fill="Red" Width="100" Height="100" Margin="10"/>
                    <Rectangle Fill="Red" Width="100" Height="100" Margin="10"/>
                    <Rectangle Fill="Red" Width="100" Height="100" Margin="10"/>
                    <Rectangle Fill="Red" Width="100" Height="100" Margin="10"/>
                    <Rectangle Fill="Red" Width="100" Height="100" Margin="10"/>
                    <Rectangle Fill="Red" Width="100" Height="100" Margin="10"/>
                    <Rectangle Fill="Red" Width="100" Height="100" Margin="10"/>
                    <Button Content="Button" HorizontalAlignment="Left" Height="60" VerticalAlignment="Top" Width="176" Margin="687,0,-743,0" Click="Button_Click"/>
                </ItemsControl.Items>
            </ItemsControl>
    

    You can refer to the links below to get more information:

    http://msdn.microsoft.com/en-us/library/windows/apps/hh452703.aspx

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Friday, March 28, 2014 7:50 AM

All replies

  • Hi,

    I'm afraid that it is not the correct forum about this issue, since this forum is to discuss WPF.

    So I have moved this thread to Windows Store Apps forum for better response.

    Thanks for your understanding.

    Best regards,
    Franklin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, March 28, 2014 3:16 AM
    Moderator
  • Hi,

    There is not enough information to detect why your problem occurs. You should upload your project into SkyDrive so that we can test it. And I think you can code EntranceThemeTransition like below, so the animation can play whenever the NavigationCacheMode set to Enabled or Disabled:

    <ItemsControl Grid.Row="1" x:Name="rectangleItems">
                <ItemsControl.ItemContainerTransitions>
                    <TransitionCollection>
                        <EntranceThemeTransition/>
                    </TransitionCollection>
                </ItemsControl.ItemContainerTransitions>
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <WrapGrid Height="400"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
    
                <!-- The sequence children appear depends on their order in 
             the panel's children, not necessarily on where they render
             on the screen. Be sure to arrange your child elements in
             the order you want them to transition into view. -->
                <ItemsControl.Items>
                    <Rectangle Fill="Red" Width="100" Height="100" Margin="10"/>
                    <Rectangle Fill="Red" Width="100" Height="100" Margin="10"/>
                    <Rectangle Fill="Red" Width="100" Height="100" Margin="10"/>
                    <Rectangle Fill="Red" Width="100" Height="100" Margin="10"/>
                    <Rectangle Fill="Red" Width="100" Height="100" Margin="10"/>
                    <Rectangle Fill="Red" Width="100" Height="100" Margin="10"/>
                    <Rectangle Fill="Red" Width="100" Height="100" Margin="10"/>
                    <Rectangle Fill="Red" Width="100" Height="100" Margin="10"/>
                    <Rectangle Fill="Red" Width="100" Height="100" Margin="10"/>
                    <Button Content="Button" HorizontalAlignment="Left" Height="60" VerticalAlignment="Top" Width="176" Margin="687,0,-743,0" Click="Button_Click"/>
                </ItemsControl.Items>
            </ItemsControl>
    

    You can refer to the links below to get more information:

    http://msdn.microsoft.com/en-us/library/windows/apps/hh452703.aspx

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Friday, March 28, 2014 7:50 AM