How to bind visibility property
问题 The XAML code is as follows: <Helper:BooleanVisibilityValueConverter x:Key="BoolToVisible" /> <Control x:Name="ResizeDecorator" MouseMove="ResizeDecorator_MouseMove" Template=" {StaticResource ResizeDecoratorTemplate}" Visibility="{Binding IsButtonVisible,Converter= {StaticResource ResourceKey=BoolToVisible},RelativeSource={RelativeSource TemplatedParent}}" /> <Helper:BooleanVisibilityValueConverter x:Key="BoolToVisible" /> <Control x:Name="ResizeDecorator" MouseMove="ResizeDecorator