Take the 2-minute tour ×

I am trying to do some stuff after light dismissing a popup in windows 8 application. There doesn't seem to be built in support for this. What is the best way to handle this?

share|improve this question
add comment

2 Answers

Have you tried handling the Popup.Closed event?

<Popup Closed="test" IsLightDismissEnabled="True">

//fires ANY time the popup is closed including on light dismissed
public void test(object one, object two)
    Debug.WriteLine("Popup was closed");
share|improve this answer
yes I do. But I need to do something after lightdismiss –  arynhard Aug 18 '12 at 3:12
I'm not sure how this doesn't cover what you need. Do you need it to do something else if it was dismissed in a different fashion? –  mydogisbox Aug 18 '12 at 15:56
add comment

If I understand what you are saying, you have two separate sets of actions. One when the popup is closed by a light dismiss, and something else when the user closes the popup via some other means.

As you know, there is no way to detect during a popup's closed event if it was closed by a light dismiss or setting the IsOpen to false.

The only way I can think to handle this is to have a flag that you toggle when you are closing the popup explicitly. Your Closed handler would check the flag to see how the popup was being closed and you would handle each scenario as desired.

share|improve this answer
add comment

Your Answer


