Reputation: 637
In my WPF-application, targeting .NET Core 3.1, I'm trying to use the built-in System.Windows.Controls.BoolToVisibilityConverter
I think I have looked up the correct syntax for the XAML reference.
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
However I get a compile error:
'System.Windows.Controls' was not found. Verify that you are not missing an assembly reference. Also, verify that your project and all referenced assemblies have been built.
What can be the problem?
Upvotes: 2
Views: 1857
Reputation: 12276
If you look at the documentation here:
It's not in the dll you're using.
Namespace: System.Windows.Controls
Assembly: PresentationFramework.dll
Change the assembly.
Title="MainWindow" Height="450" Width="800"
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=PresentationFramework"
>
<Window.Resources>
<controls:BooleanToVisibilityConverter x:Key="boolConv"/>
</Window.Resources>
Upvotes: 5