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

XFEExtension.NetCore.WinUIHelper

【DLL】WinUI的各种工具类,帮助开发者快速构建一个模块化的WinUI项目

公开
关注 0 Fork 0 Star 0
GB18030 / GBK
using Microsoft.UI.Xaml.Navigation;

namespace XFEExtension.NetCore.WinUIHelper.TestApp.Views
{
    /// <summary>
    /// 主页
    /// </summary>
    public sealed partial class MainPage : Page
    {
        public static MainPage? Current { get; set; }
        public MainPageViewModel ViewModel { get; set; } = new();
        public MainPage()
        {
            Current = this;
            InitializeComponent();
            ViewModel.AutoNavigationParameterService.Initialize(this);
        }

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            ViewModel.AutoNavigationParameterService.OnParameterChange(e.Parameter);
        }

        protected override void OnNavigatedFrom(NavigationEventArgs e)
        {
            base.OnNavigatedFrom(e);
        }
    }
}