XFEstudio/MyFirstRespo
完成基础归类,添加数个页面
17d530c
代码差异
8 个文件
+53
-19
@@ -0,0 +1,7 @@
1
using CommunityToolkit.Mvvm.ComponentModel;
2
3
namespace XFEToolBox.ViewModel;
4
5
public class MainPageViewModel : ObservableObject
6
{
7
}
@@ -1,22 +1,11 @@
1
1
using CommunityToolkit.Mvvm.ComponentModel;
2
using FileSystemWatcher.ViewPage;
2
3
using System.Windows.Controls;
3
4
4
5
namespace FileSystemWatcher.ViewModel;
5
6
6
7
public partial class MainWindowViewModel : ObservableObject
7
8
{
8
public MainWindow ViewPage { get; set; }
9
10
9
[ObservableProperty]
11
private Page? currentPage;
12
13
14
public MainWindowViewModel(MainWindow viewPage)
15
{
16
ViewPage = viewPage;
17
}
18
19
public MainWindowViewModel()
20
{
21
}
10
private Page? currentPage = new MainPage();
22
11
}
@@ -0,0 +1,7 @@
1
using CommunityToolkit.Mvvm.ComponentModel;
2
3
namespace XFEToolBox.ViewModel;
4
5
public class SettingPageViewModel : ObservableObject
6
{
7
}
@@ -7,8 +7,9 @@
7
7
mc:Ignorable="d"
8
8
d:DesignHeight="450" d:DesignWidth="800"
9
9
Title="MainPage">
10
11
10
<Grid>
12
11
<TextBlock Foreground="White">
12
<Span>亻尔 女子</Span>
13
</TextBlock>
13
14
</Grid>
14
15
</Page>
@@ -0,0 +1,14 @@
1
<Page x:Class="XFEToolBox.ViewPage.SettingPage"
2
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6
xmlns:local="clr-namespace:XFEToolBox.ViewPage"
7
mc:Ignorable="d"
8
d:DesignHeight="450" d:DesignWidth="800"
9
Title="SettingPage">
10
11
<Grid>
12
13
</Grid>
14
</Page>
@@ -0,0 +1,14 @@
1
using System.Windows.Controls;
2
3
namespace XFEToolBox.ViewPage;
4
5
/// <summary>
6
/// SettingPage.xaml 的交互逻辑
7
/// </summary>
8
public partial class SettingPage : Page
9
{
10
public SettingPage()
11
{
12
InitializeComponent();
13
}
14
}
@@ -1,10 +1,10 @@
1
<Window x:Class="FileSystemWatcher.MainWindow"
1
<Window x:Class="FileSystemWatcher.Windows.MainWindow"
2
2
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
3
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
4
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5
5
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6
6
xmlns:viewmodel="clr-namespace:FileSystemWatcher.ViewModel"
7
xmlns:local="clr-namespace:FileSystemWatcher"
7
xmlns:local="clr-namespace:FileSystemWatcher.Windows"
8
8
mc:Ignorable="d"
9
9
Title="MainWindow" Height="500" Width="800" Background="Transparent" WindowStyle="None" AllowsTransparency="True" WindowStartupLocation="CenterScreen">
10
10
<Window.DataContext>
@@ -37,7 +37,7 @@
37
37
<Span Foreground="#9898e7" FontSize="18" FontWeight="Bold">XFE·工具箱</Span>
38
38
</TextBlock>
39
39
</Border>
40
<Frame Grid.Column="1" Grid.Row="1" NavigationUIVisibility="Hidden" Content=""/>
40
<Frame Grid.Column="1" Grid.Row="1" NavigationUIVisibility="Hidden" Content="{Binding CurrentPage}"/>
41
41
</Grid>
42
42
</Border>
43
43
</Window>
@@ -1,15 +1,17 @@
1
1
using System.Windows;
2
2
3
namespace FileSystemWatcher
3
namespace FileSystemWatcher.Windows
4
4
{
5
5
/// <summary>
6
6
/// Interaction logic for MainWindow.xaml
7
7
/// </summary>
8
8
public partial class MainWindow : Window
9
9
{
10
public static MainWindow? Current { get; private set; }
10
11
public MainWindow()
11
12
{
12
13
InitializeComponent();
14
Current = this;
13
15
}
14
16
}
15
17
}