ControlDesigner.OnClick Method (DesignerRegionMouseEventArgs)
Called by the design host when the user clicks the associated control at design time.
Assembly: System.Design (in System.Design.dll)
abstract OnClick : e:DesignerRegionMouseEventArgs -> unit override OnClick : e:DesignerRegionMouseEventArgs -> unit
The ViewEvent event is raised by the design host for certain actions on a control in the design surface. For example, an event is raised for the following conditions:
The user clicks the control.
The control designer paints on the design surface.
The user enters or exits template editing mode for the control.
The ControlDesigner class supplies a default delegate to handle the IControlDesignerView.ViewEvent event. Classes deriving from ControlDesigner override the method to process events that are raised when the user clicks a control.
Themethod allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
The default implementation of themethod returns without performing any processing.
Notes to Inheritors:
The following code example shows how to use a handler for the DesignerRegionMouseEventArgs object to identify the region that is being clicked.event in a clickable region of the control and use a
This code example is part of a larger code example for the EditableDesignerRegion class.
Available since 2.0