Reputation: 1893
<DataTrigger Binding="{Binding IsMouseOver, ElementName=minimapButton}" Value="True">
<Setter Property="IsOpen" Value="True" />
</DataTrigger>
The binding above is using IsMouseOver
which refer to the element name minimapButton
.
What should be the code for mouse click? IsMouseClicked
? IsMouseLeftDown
?
Upvotes: 0
Views: 484
Reputation: 1527
If you are in MVVm you cay try the Command or the expression interaction to catch the mouse click to the view model.
Upvotes: 0
Reputation: 12356
Register a new event for the button click.
<Button Click="button1_Click" />
And the code behind
private void button1_Click(object sender, RoutedEventArgs e)
{
}
Upvotes: 1
Reputation: 2323
I would try IsMouseCaptured.
http://msdn.microsoft.com/en-us/library/system.windows.contentelement.ismousecaptured.aspx
Upvotes: 1