Adding Events with the WFC Component Builder

Use the WFC Component Builder to add and delete custom events from your controls. You can then avoid manually defining events in your control's ClassInfo class.

To add an event using the WFC Component Builder

  1. In Class Outline, right-click your control's class name, and then click WFC Component Builder. (To display Class Outline, on the View menu, point to Other Windows and then click Document Outline.)

  2. In the Events section of the WFC Component Builder, click Add.

  3. In the Add WFC Event dialog box, define the checkedChanged event for the GroupCheck control according to the following table, and then click OK.
    Field Value
    Name checkedChanged
    Type Event
    Category Action
    Description Occurs when the control's check box check state is changed.

  4. In the WFC Component Builder, click OK.

    The WFC Component Builder adds the addOnCheckedChanged, removeOnCheckedChanged, and onCheckedChanged methods to the code and adds an event definition in the control's ClassInfo class. The WFC Component Builder also adds an instance of the EventHandler delegate, which is used by the event.

The next step is to override inherited methods.