logo
Учебник_ПОА

To create event handlers

  1. Double-click Clear, and then add the following code to the generated Click event handler:

    this.inkCanvas1.Strokes.Clear();

  2. Return to Designer view by right-clicking the Code Editor and then clicking Designer.

  3. Double-click Close, and then add the following code to the generated Click event handler:

    this.Close();

  4. Press F5 to run the project.

  5. When the application opens, draw a picture in the InkCanvas control. If you make a mistake, you can click Clear to start over.

  6. Click Close to the close the application.