locked
EntranceThemeTransition seems to only work once?? RRS feed

  • Question

  • Hi

    I am using the EntranceThemeTransition on a panel I have entering on the right similar to the setting pane however after the first time the theme animation don't seem to work anymore?? I have also tried the ContentThemeTransition still the same issue.. can someone tell me why this is?

    double ContentAnimationOffset = 100;
    
    //open panel 
    private void bnFlyout_Click(object sender, RoutedEventArgs e)
            {
                gdFlyout.Visibility = Windows.UI.Xaml.Visibility.Visible;
    
                FlyoutContent.Visibility = Windows.UI.Xaml.Visibility.Visible;
                FlyoutContent1.Visibility = Windows.UI.Xaml.Visibility.Visible;
    
                FlyoutContent.Transitions.Clear();
                FlyoutContent.Transitions.Add(new ContentThemeTransition()
                {
                 //   IsStaggeringEnabled = true,
                    HorizontalOffset = (SettingsPane.Edge == SettingsEdgeLocation.Right) ? ContentAnimationOffset : (ContentAnimationOffset * -1)
                });
    
                FlyoutContent1.Transitions.Add(new EntranceThemeTransition()
                {
                    IsStaggeringEnabled = true,
                    FromHorizontalOffset = (SettingsPane.Edge == SettingsEdgeLocation.Right) ? ContentAnimationOffset : (ContentAnimationOffset * -1)
                });
           }
    
    //close panel
    private void bnFlyoutBack_Click(object sender, RoutedEventArgs e)
            {
                FlyoutContent.Transitions.Add(new ContentThemeTransition()
                {
                   // IsStaggeringEnabled = true,
                    HorizontalOffset = (SettingsPane.Edge == SettingsEdgeLocation.Left) ? ContentAnimationOffset : (ContentAnimationOffset * -1)
                });
    
                
                FlyoutContent1.Transitions.Add(new EntranceThemeTransition()
                {
                    IsStaggeringEnabled = true,
                    FromHorizontalOffset = (SettingsPane.Edge == SettingsEdgeLocation.Left) ? ContentAnimationOffset : (ContentAnimationOffset * -1)
                });
    
                FlyoutContent.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
                FlyoutContent1.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
                gdFlyout.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
            }

     


    Juan Rodriguez Celltrac Software

    Thursday, August 22, 2013 7:12 PM

Answers

  • Hi rruffman07,

    In the document of EntranceThemeTransition  you will be able to see :

    Provides the animated transition behavior on controls when they first appear. You can use this on individual objects or on containers of objects. In the latter case, child elements will animate into view in sequence rather than all at the same time.

    And for the ContentThemeTransition, animated transition only occurs when the content of a control is changing.

    So actually they are both correct behaviour.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" 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, August 23, 2013 5:32 AM
    Moderator