The name "ClassicBorderDecorator" does not exist in the namespace "clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"

StackOverflow https://stackoverflow.com/questions/19024471

  •  29-06-2022
  •  | 
  •  

Question

I have been charged with fixing somebody elses work, but this error is puzzling me.

The name "ClassicBorderDecorator" does not exist in the namespace "clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"

I have a reference set to PresentaionFramework.Aero already included and the xmlns tag set, what am I missing?

<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">
Was it helpful?

Solution

I have not tried it but it seems that that ClassicBorderDecorator is defined in PresentationFramework.Classic.dll (not in PresentationFramework.Aero.dll). So you need to fix your reference and change your namespace definition:

 <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">
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top