DEN
DEN

Reputation: 1893

What should be the binding for mouse click?

<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

Answers (3)

Joy George Kunjikkuru
Joy George Kunjikkuru

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

Tomislav Markovski
Tomislav Markovski

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

Related Questions