我被指控修复别人的工作,但这个错误让我感到困惑。
The name "ClassicBorderDecorator" does not exist in the namespace "clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
我有一个引用集 PresentaionFramework.Aero 已经包含和 xmlns 标签集,我缺少什么?
<Application
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" x:Class="Application"
StartupUri="MainWindow.xaml">
我没有尝试过,但似乎ClassicBorderDecorator
是在PresentationFramework.Classic.dll
中定义的(而不是在PresentationFramework.Aero.dll
中)。因此,您需要修复引用并更改命名空间定义:
<Application
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
x:Class="Application" StartupUri="MainWindow.xaml">