上传代码

This commit is contained in:
2026-04-18 18:14:12 +08:00
commit d5e183e551
1472 changed files with 50231 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
using System.Collections.Generic;
using System.Windows.Controls;
public static class NavigationHelper
{
public static Frame MainFrame { get; set; }
private static Stack<Page> _history = new Stack<Page>();
// 跳转页面
public static void NavigateTo(Page page)
{
if (MainFrame.Content != null)
_history.Push( MainFrame.Content as Page);
MainFrame.Content = page;
}
// 返回上一页
public static void GoBack()
{
System.Diagnostics.Debug.WriteLine("页面加载了55555");
if (_history.Count > 0)
{
System.Diagnostics.Debug.WriteLine("页面加载了4444");
MainFrame.Content = _history.Pop();
}
}
}