01启动项目
-
打开Visual Studio
-
创建一个名为“Caliburn.Micro.Hello”的新WPF应用程序
-
添加对Caliburn.Micro Nuget包的引用,最新的版本是4.0.173,更新日期2021年5月9日 (2021/5/9)
4.删除“MainWindow.xaml”并从“App.xaml”中删除StartupUri,使其如下所示:
<Application x:Class="Caliburn.Micro.Hello.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Caliburn.Micro.Hello">
<Application.Resources>
</Application.Resources>
</Application>
既然Caliburn.Micro更喜欢ViewModel优先的方法,让我们从这里开始。
①