修正下,其中XXX是你自己的程序集名。 <NavigationWindow x:Class="XXX.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 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" xmlns:local="clr-namespace:XXX" mc:Ignorable="d" Title="MainWindow" Height="350" Width="525"> </NavigationWindow>
[quote=引用 1 楼 D56233577 的回复:] 注意看你的代码,这个类是分部类,所以XAML中的Window也要改成NavigationWindow。
注意看你的代码,这个类是分部类,所以XAML中的Window也要改成NavigationWindow。
110,571
社区成员
642,568
社区内容
加载中
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧