0

在我的 windows phone 应用程序中,我有一个非 UI 类,当从 UI 页面调用时,它将显示和隐藏弹出屏幕。

我想在显示弹出窗口时隐藏应用程序栏,并在关闭弹出窗口时再次显示应用程序栏。

现在这里的挑战是我在非 UI 类中有一个计时器,它处理弹出窗口的关闭。所以从 UI 类我只能启动弹出窗口。关闭由非 UI 类控制。所以现在我需要从非 UI 类访问 appbar。

如果我能做到这一点,任何人都可以帮助我,或者如果不能做到这一点,任何解决方法都可以。?

谢谢你。

4

1 回答 1

1

Maybe making use of Popup.Closed Event would help:

private void myPopup_Close(object sender, System.EventArgs e)
{
   // get current Page
   var currentPage = ((App.Current as App).RootVisual as PhoneApplicationFrame).Content as PhoneApplicationPage;
    // hide popup
    currentPage.ApplicationBar.IsVisible = true;
}
于 2014-06-04T14:50:42.483 回答