I am working on a WPF app where I have recently added some elements from http://schemas.microsoft.com/xaml/behaviors. I have added a reference to the Microsoft.Xaml.Behaviors.Wpf NuGet. It seems to work properly in runtime, but during design time in Blend 2022 I get an error "The element [Button] could not be displayed because of a problem with System.Windows.Controls.Button." with stack trace saying 'Cannot set unknown member '{http://schemas.microsoft.com/xaml/behaviors}Interaction.Triggers'.' and the design view doesn't display the controls using those properties.
What's weird is that it worked briefly, but it seems to have stopped working after I've started using the properties on more elements (now even the elements that have worked before do not work, even after clearing and rebuilding everything). Also it seems to work properly in Blend 2019, although I've only checked it out briefly.
I tried changing xmlns:b="http://schemas.microsoft.com/xaml/behaviors" to xmlns:b="clr-namespace:Microsoft.Xaml.Behaviors;assembly=Microsoft.Xaml.Behaviors" as per this answer Interaction triggers inside DataTemplate not working with XamlReader but that didn't help, I think it's completely unrelated.
The properties are set inside a control template like this
<ControlTemplate x:Key="UniversalComponentMainMenuButtonTemplate" TargetType="{x:Type Button}">
<!--resources here-->
<Border x:Name="OuterBorder" CornerRadius="20" ClipToBounds="True" Background="#00000000" Margin="-5, -5, -5, -5">
<b:Interaction.Triggers>
<b:EventTrigger EventName="PreviewMouseDown">
<b:PlaySoundAction Source="Sounds/MouseClick.wav"/>
</b:EventTrigger>
<b:EventTrigger EventName="MouseEnter">
<b:PlaySoundAction Source="Sounds/MouseEnter.wav"/>
</b:EventTrigger>
</b:Interaction.Triggers>
<!-- rest of control template here -->
</Border>
</ControlTemplate>
Then there's a style that sets the control template
<Style x:Key="UniversalComponentMainMenuButtonStyle" TargetType="{x:Type Button}">
<Setter Property="Template" Value="{StaticResource UniversalComponentMainMenuButtonTemplate}" />
</Style>
And then buttons that use said style (the style and control template are inside a separate resource dictionary, that is included in App.xaml as Application.Resources).
<Button Style="{DynamicResource UniversalComponentMainMenuButtonStyle}">
<Image Source="PathToImage"/>
</Button>