Handling Mouse Click Events

After you add a MultiPoint Mouse control to handle mouse clicks, you declare an event handler as described in the following procedure.

To declare an event handler for mouse clicks

  1. Declare a click event handler on mpButton by adding the following declaration in the constructor:

    // Declare MultiPoint mouse button handler
    mpButton.MultipointClick += mpButton_Click;
    
  2. Create the handler as follows:

    // Handle clicks on the mpButton MultiPointButton
    private void mpButton_Click(object sender, RoutedEventArgs e)
    {
        mpButton.Content = "Click";
    }