I would like to bind my button to a non static ICommand property. But it would seem all examples I've found are only relevant to static properties.
For example. Here's what I've managed thus far
<Button Grid.Column="1" HorizontalAlignment="Right" Background="{DynamicResource Accent}" Margin="80,0"
DataContext="{TemplateBinding LogoData}"
Command="{Binding Source={x:Static materialMenu:SideMenu.OpenSidebar}}">
<Path Data="{Binding}" Stretch="Fill" Fill="White" Width="24" Height="24" HorizontalAlignment="Center" VerticalAlignment="Center" />
</Button>
The above command binding will only let me bind to a static command property. The same goes for this next one;
<Button Grid.Column="1" HorizontalAlignment="Right" Background="{DynamicResource Accent}" Margin="80,0"
DataContext="{TemplateBinding LogoData}"
Command="materialMenu:SideMenu.OpenSidebar"
CommandParameter="{Binding}">
<Path Data="{Binding}" Stretch="Fill" Fill="White" Width="24" Height="24" HorizontalAlignment="Center" VerticalAlignment="Center" />
</Button>
So my question is: Since my data-context has already been set to another class, is there any way in wpf to bind a command to a non static property?