XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEEDToolBox

【WinUI】XFE精英危险工具箱

公开
关注 0 Fork 0 Star 0
UTF-8
using XFEEDToolBox.ViewModels;
namespace XFEEDToolBox.Views;

public sealed partial class RefitShipDetailsPage:Page
{
    public ToolboxViewModel ViewModel=>App.ViewModel;
    public RefitShipDetailsPage(){InitializeComponent();NavigationCacheMode=Microsoft.UI.Xaml.Navigation.NavigationCacheMode.Required;}
    protected override void OnNavigatedTo(Microsoft.UI.Xaml.Navigation.NavigationEventArgs args)
    {base.OnNavigatedTo(args);ViewModel.SetRefitDetailsActive(true);DetailsShipModel.ResumePage();}
    protected override async void OnNavigatedFrom(Microsoft.UI.Xaml.Navigation.NavigationEventArgs args)
    {base.OnNavigatedFrom(args);ViewModel.SetRefitDetailsActive(false);await DetailsShipModel.SuspendPageAsync();}
    private void BackToRefit(object sender,RoutedEventArgs args)=>AppShellPage.Current?.Navigate(typeof(RefitPage));
}