Probably you made some mistakes or forgot to set the DataContext (which can be done in constructor or Load event, for example). Show some details.
The next fragments of MainWindow window seems to work.
XAML:
<Window x:Class="MainWindow"
. . .
Loaded="Window_Loaded">
<Grid>
<Button x:Name="btnDone" Content="Done" Margin="24,68,612,297">
<Button.Style>
<Style
TargetType="Button">
<Setter Property="Visibility" Value="Collapsed" />
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsDrawing}" Value="True">
<Setter Property="Visibility" Value="Visible" />
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
<Button x:Name="testButton" Content="test" HorizontalAlignment="Left" Margin="355,31,0,0" VerticalAlignment="Top" Width="75" Click="testButton_Click"/>
</Grid>
</Window>
Class:
Class MainWindow
Private Shared ReadOnly Property IsDrawingProperty As DependencyProperty = DependencyProperty.Register(NameOf(IsDrawing), GetType(Boolean), GetType(MainWindow))
Public Property IsDrawing As Boolean
Get
Return CBool(GetValue(IsDrawingProperty))
End Get
Set(value As Boolean)
SetValue(IsDrawingProperty, value)
End Set
End Property
Private Sub Window_Loaded(sender As Object, e As RoutedEventArgs)
DataContext = Me
End Sub
Private Sub testButton_Click(sender As Object, e As RoutedEventArgs)
IsDrawing = True
End Sub
End Class
This example assumes that IsDrawing is a member of your window.