本文整理匯總了C#中BackRequestedEventArgs類的典型用法代碼示例。如果您正苦於以下問題:C# BackRequestedEventArgs類的具體用法?C# BackRequestedEventArgs怎麽用?C# BackRequestedEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
BackRequestedEventArgs類屬於命名空間,在下文中一共展示了BackRequestedEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: CustomConnectedAnimationDetail_BackRequested
private void CustomConnectedAnimationDetail_BackRequested(object sender, BackRequestedEventArgs e)
{
if (!e.Handled)
{
// Unregister the handler
SystemNavigationManager.GetForCurrentView().BackRequested -= CustomConnectedAnimationDetail_BackRequested;
// We are about to transition to a new page. Cancel any outstanding transitions.
if (_currentTransition != null)
{
if (!_currentTransition.Completed)
{
_currentTransition.Cancel();
}
_currentTransition = null;
}
// Setup the new transition and trigger the navigation
ConnectedTransition transition = new ConnectedTransition();
transition.Initialize(_host, ThumbnailImage, _detailsInfo);
_host.Navigate(typeof(CustomConnectedAnimation), transition);
// We've got it handled
e.Handled = true;
}
}
示例2: OnBackRequested
private void OnBackRequested(object sender, BackRequestedEventArgs e) {
// Mark event as handled so we don't get bounced out of the app.
e.Handled = true;
// Page above us will be our master view.
// Make sure we are using the "drill out" animation in this transition.
Frame.Navigate(typeof(SearchResult), "Back", new EntranceNavigationTransitionInfo());
}
示例3: MainPage_BackRequested
private void MainPage_BackRequested(object sender, BackRequestedEventArgs e)
{
if (InnerFrame.CanGoBack)
{
InnerFrame.GoBack();
}
}
示例4: AddGalery_BackRequested
private void AddGalery_BackRequested(object sender, BackRequestedEventArgs e)
{
if (e.Handled == false) {
e.Handled = true;
rootFrame.GoBack();
}
}
示例5: MainPage_BackRequested
/// <summary>
/// 係統後退
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private async void MainPage_BackRequested(object sender, BackRequestedEventArgs e)
{
if (!sptViewNavigation.IsSwipeablePaneOpen)
{
if (this.frmPages.CanGoBack && !this.frmPages.Content.GetType().Equals(typeof(HomePage))) //
{
this.frmPages.GoBack();
}
else
{
if (popTips.IsOpen) //第二次按back鍵
{
Application.Current.Exit();
}
else
{
popTips.IsOpen = true; //提示再按一次
popTips.HorizontalOffset = this.ActualWidth / 2 - 45; //居中
popTips.VerticalOffset = this.ActualHeight / 2 - 5;
e.Handled = true;
await Task.Delay(1000); //1000ms後關閉提示
popTips.IsOpen = false;
}
}
}
else
{
sptViewNavigation.IsSwipeablePaneOpen = false;
}
e.Handled = true;
}
示例6: OnBackRequested
// What happens when back button is pressed
private void OnBackRequested(object sender, BackRequestedEventArgs backRequestedEventArgs)
{
if (Frame.CanGoBack)
Frame.GoBack();
// mark the event as handled so that UI will not handle
backRequestedEventArgs.Handled = true;
}
示例7: OnBackRequested
private void OnBackRequested(object sender, BackRequestedEventArgs backRequestedEventArgs)
{
if (Frame.CanGoBack)
Frame.GoBack();
backRequestedEventArgs.Handled = true;
}
示例8: Go_Back
private void Go_Back(object sender, BackRequestedEventArgs e)
{
systemNavigationManager.BackRequested -= Go_Back;
if (!isNarrow || (isNarrow && !isEditting)) {
System.Diagnostics.Debug.WriteLine("Going back to Main");
Frame rootFrame = Window.Current.Content as Frame;
if (rootFrame == null)
return;
// Navigate back if possible, and if the event has not
// already been handled .
if (rootFrame.CanGoBack && e.Handled == false)
{
e.Handled = true;
rootFrame.GoBack();
}
}
else {
System.Diagnostics.Debug.WriteLine("Going back to Master");
e.Handled = true;
isEditting = false;
adjustColumns();
systemNavigationManager.BackRequested += Go_Back;
}
}
示例9: OnBackRequested
private void OnBackRequested(object sender, BackRequestedEventArgs e)
{
if ( lastpage == typeof(MainPage))
this.Frame.Navigate(typeof(MainPage));
else if (lastpage == typeof(Pages.Page_Livros))
this.Frame.Navigate(typeof(Pages.Page_Livros));
}
示例10: SystemNavigationManager_BackRequested
private void SystemNavigationManager_BackRequested(object sender, BackRequestedEventArgs e)
{
if (!e.Handled)
{
e.Handled = TryGoBack();
}
}
示例11: backButton
private void backButton(object sender, BackRequestedEventArgs e)
{
if (Frame.CanGoBack) {
e.Handled = true;
Frame.GoBack();
}
}
示例12: App_BackRequested
private void App_BackRequested(object sender, BackRequestedEventArgs e)
{
if (!e.Handled)
{
if (CommunityItemPhotoGrid.Visibility == Visibility.Visible)
{
CommunityItemPhotoGrid.Visibility = Visibility.Collapsed;
//SystemNavigationManager.GetForCurrentView().BackRequested -= App_BackRequested;
//SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Collapsed;
}
else if (ContentFrame.Visibility == Visibility.Visible)
{
if (!App.isPerInfoContentImgShow)
{ //SystemNavigationManager.GetForCurrentView().BackRequested -= App_BackRequested;
//SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Collapsed;
ContentFrame.Visibility = Visibility.Collapsed;
//CommunityMyAppBarButton.Visibility = Visibility.Visible;
}
}
else
{
if (Frame.CanGoBack)
{
Frame.GoBack();
}
SystemNavigationManager.GetForCurrentView().BackRequested -= App_BackRequested;
SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Collapsed;
}
}
e.Handled = true;
}
示例13: OnBackRequested
public void OnBackRequested(object sender, BackRequestedEventArgs e)
{
Debug.WriteLine("On Back request");
var navigableViewModel = this.DataContext as INavigable;
if (navigableViewModel != null)
{
if (navigableViewModel.AllowGoBack())
{
if (this.Frame.CanGoBack)
{
this.Frame.GoBack();
//Prevent out app
if (e != null)
e.Handled = true;
}
}
else
{
if (e != null)
//Prevent out app
e.Handled = true;
}
}
else
{
if (App.Current.NavigationService.CanGoBack())
{
App.Current.NavigationService.GoBack();
//Prevent out app
if (e != null)
e.Handled = true;
}
}
}
示例14: SystemNavigationManager_BackRequested
private void SystemNavigationManager_BackRequested(object sender, BackRequestedEventArgs e)
{
profileViewModel.PropertyChanged += ViewModel_PropertyChanged;
if (!e.Handled)
{
e.Handled = TryGoBack();
}
}
示例15: CurrentView_BackRequested
private void CurrentView_BackRequested(object sender, BackRequestedEventArgs e)
{
if (this.Frame.CanGoBack)
{
e.Handled = true;
this.Frame.GoBack();
}
}