locked
How to animate the hiding procdure of a pop up(whose IsLightDismissEnabled is set as True)?

    Question

  • Dear all,

    For the opening animation, it is quite easy:

       <Popup.ChildTransitions>
          <TransitionCollection>
             <EdgeUIThemeTransition Edge="Left"/>
          </TransitionCollection>
       </Popup.ChildTransitions>
    We could give different value to "Edge".

    But for the closing/hiding, it seems that there is no direct way to achieve this effect.

    After some investigations, I found that the settings pane also has no closing/hiding animation effect. But the bottom/top app bar have the effect.

    There has been a discussing thread here:

    http://stackoverflow.com/questions/21111162/how-to-animate-a-popup-when-it-hides

    But IsLightDismissEnabled is set as False in that case.

    Would you please give me any suggestion?

    Thank you very much!


    • Edited by B0L Thursday, September 25, 2014 7:27 AM
    Thursday, September 25, 2014 7:25 AM

Answers

  • Like it or not, LghtDismiss has it's own animation  and it applies to multiple controls, so that's why you would need to set LightDismiss to flase in order to animate the closing.  That's not to say this couldn't be improved, but it's what it is for the time being.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    • Marked as answer by B0L Friday, September 26, 2014 6:22 AM
    Friday, September 26, 2014 2:16 AM
    Moderator

All replies

  • Like it or not, LghtDismiss has it's own animation  and it applies to multiple controls, so that's why you would need to set LightDismiss to flase in order to animate the closing.  That's not to say this couldn't be improved, but it's what it is for the time being.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    • Marked as answer by B0L Friday, September 26, 2014 6:22 AM
    Friday, September 26, 2014 2:16 AM
    Moderator
  • Hi, Matt, get it! Thank you very much.
    Friday, September 26, 2014 6:22 AM