Merge pull request #2855 from andrechi1/develop
Implement MvxWindowsPage.ClearBackStack
This commit is contained in:
Коммит
3d831466ff
|
@ -1,15 +1,17 @@
|
||||||
// Licensed to the .NET Foundation under one or more agreements.
|
// Licensed to the .NET Foundation under one or more agreements.
|
||||||
// The .NET Foundation licenses this file to you under the MS-PL license.
|
// The .NET Foundation licenses this file to you under the MS-PL license.
|
||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Windows.UI.Xaml;
|
using System.Linq;
|
||||||
using Windows.UI.Xaml.Controls;
|
|
||||||
using Windows.UI.Xaml.Navigation;
|
|
||||||
using MvvmCross.Platforms.Uap.Views.Suspension;
|
using MvvmCross.Platforms.Uap.Views.Suspension;
|
||||||
using MvvmCross.ViewModels;
|
using MvvmCross.ViewModels;
|
||||||
using MvvmCross.Views;
|
using MvvmCross.Views;
|
||||||
|
using Windows.UI.Core;
|
||||||
|
using Windows.UI.Xaml;
|
||||||
|
using Windows.UI.Xaml.Controls;
|
||||||
|
using Windows.UI.Xaml.Navigation;
|
||||||
|
|
||||||
namespace MvvmCross.Platforms.Uap.Views
|
namespace MvvmCross.Platforms.Uap.Views
|
||||||
{
|
{
|
||||||
|
@ -66,14 +68,21 @@ namespace MvvmCross.Platforms.Uap.Views
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ClearBackStack()
|
public virtual void ClearBackStack()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
var backStack = base.Frame?.BackStack;
|
||||||
/*
|
|
||||||
// note - we do *not* use CanGoBack here - as that seems to always returns true!
|
while (backStack?.Any())
|
||||||
while (NavigationService.BackStack.Any())
|
{
|
||||||
NavigationService.RemoveBackEntry();
|
backStack.RemoveAt(0);
|
||||||
*/
|
}
|
||||||
|
|
||||||
|
UpdateBackButtonVisibility();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void UpdateBackButtonVisibility()
|
||||||
|
{
|
||||||
|
SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Collapsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string _reqData = string.Empty;
|
private string _reqData = string.Empty;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче