20230724_MBJC_upperpc/Model/FirstWindowModel.cs

30 lines
994 B
C#
Raw Permalink Normal View History

2023-12-18 09:31:28 +00:00
using _20230724_MBJC_upperpc.Common;
using _20230724_MBJC_upperpc.Domain;
2023-11-15 05:34:33 +00:00
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Documents;
namespace _20230724_MBJC_upperpc.Model
{
public class FirstWindowModel
{
2023-12-18 09:31:28 +00:00
2023-11-15 05:34:33 +00:00
public ObservableCollection<CustomTab> CustomTabs { get; }
public CustomTab? SelectedTab { get; set; }
public FirstWindowModel()
{
Type type = Type.GetType("_20230724_MBJC_upperpc.Views.FirstPageView");
2023-12-15 08:14:17 +00:00
//Type type = Type.GetType("_20230724_MBJC_upperpc.Views.SecondPageView");
2023-11-15 05:34:33 +00:00
ConstructorInfo cti = type.GetConstructor(System.Type.EmptyTypes);
FrameworkElement page = (FrameworkElement)cti.Invoke(null);
CustomTabs = new() { new CustomTab { CustomHeader = "首页", PageContent = page } };
}
}
}