File tree Expand file tree Collapse file tree 5 files changed +49
-15
lines changed
Expand file tree Collapse file tree 5 files changed +49
-15
lines changed Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Collections . Generic ;
3+ using System . Linq ;
4+ using System . Text ;
5+ using System . Threading . Tasks ;
6+
7+ namespace LLCOM . ViewModels ;
8+
9+ public partial class MainViewModel : ViewModelBase
10+ {
11+
12+ }
Original file line number Diff line number Diff line change @@ -6,12 +6,6 @@ namespace LLCOM.ViewModels
66
77 public partial class MainWindowViewModel : ViewModelBase
88 {
9- /// <summary>
10- /// 标题栏
11- /// </summary>
12- [ ObservableProperty ]
13- public string _title = "LLCOM" ;
14-
159 public MainWindowViewModel ( )
1610 {
1711
Original file line number Diff line number Diff line change 1+ <UserControl
2+ x : Class =" LLCOM.Views.MainView"
3+ xmlns =" https://github.com/avaloniaui"
4+ xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
5+ xmlns : d =" http://schemas.microsoft.com/expression/blend/2008"
6+ xmlns : mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
7+ xmlns : vm =" using:LLCOM.ViewModels"
8+ d : DesignHeight =" 450"
9+ d : DesignWidth =" 800"
10+ x : DataType =" vm:MainViewModel"
11+ mc : Ignorable =" d" >
12+ <Grid >
13+ <TextBlock
14+ HorizontalAlignment =" Center"
15+ VerticalAlignment =" Center"
16+ Text =" Welcome to Avalonia!" />
17+ </Grid >
18+ </UserControl >
Original file line number Diff line number Diff line change 1+ using Avalonia ;
2+ using Avalonia . Controls ;
3+ using Avalonia . Markup . Xaml ;
4+
5+ namespace LLCOM . Views ;
6+
7+ public partial class MainView : UserControl
8+ {
9+ public MainView ( )
10+ {
11+ InitializeComponent ( ) ;
12+ }
13+ }
Original file line number Diff line number Diff line change 44 xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
55 xmlns : d =" http://schemas.microsoft.com/expression/blend/2008"
66 xmlns : mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
7+ xmlns : views =" clr-namespace:LLCOM.Views"
78 xmlns : vm =" using:LLCOM.ViewModels"
8- Title =" {Binding Title} "
9- d : DesignHeight = " 450 "
10- d : DesignWidth = " 800 "
9+ Title =" LLCOM Next "
10+ Height= " 800 "
11+ Width= " 1200 "
1112 x : DataType =" vm:MainWindowViewModel"
1213 Icon =" /Assets/llcom-logo.ico"
1314 WindowStartupLocation =" CenterScreen"
1415 mc : Ignorable =" d" >
15-
16- <Design .DataContext>
17- <vm : MainWindowViewModel />
18- </Design .DataContext>
19-
20-
16+ <!-- 这里别写别的ui控件,不然跨平台会出问题 -->
17+ <views : MainView />
2118</Window >
You can’t perform that action at this time.
0 commit comments