private void OnHostPopupClosed(object sender, object e)
{
// important to remove this or else there will be a leak
Window.Current.Activated -= OnCurrentWindowActivated;
Windows.UI.ViewManagement.InputPane.GetForCurrentView().Showing -= OnInputPaneShowing;
Windows.UI.ViewManagement.InputPane.GetForCurrentView().Hiding -= OnInputPaneHiding;
if (Closed != null)
{
Closed(this, e);
}
IsOpen = false;
}