我正在尝试熟悉 Avalonia,并将我的一个项目移植到它上面。
我在创建新窗口时遇到问题 - 我使用Tutorial中的手册,并在我的解决方案资源管理器中仅获取 .xaml.cs 文件:
文件 AboutView.xaml 在项目文件夹中创建,包含
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="MyProjectName.Views.AboutView"
Title="AboutView">
Welcome to Avalonia!
但未显示。AboutView.xaml.cs 包含以下代码,并显示错误:
我究竟做错了什么?