c#公共类的时候,没法导航的问题,解决方法:
private static PhoneApplicationFrame _frame; private static PhoneApplicationFrame Frame { get { return _frame ?? (_frame = (PhoneApplicationFrame) Application.Current.RootVisual); } } Deployment.Current.Dispatcher.BeginInvoke(() => { if (MessageBox.Show(message.ToString(), "", MessageBoxButton.OKCancel) == MessageBoxResult.OK) Frame.Navigate(new Uri(url, UriKind.Relative)); });
c#公共类获取当前页面
时间: 2024-10-07 06:35:36