Skip to content

Summary: Event related

Maira Wenzel edited this page Apr 23, 2019 · 1 revision

The following table provides wording guidelines and boilerplate text for Summary sections in event and event-related class pages.

Item Wording Examples
Event Occurs when <condition>. Click event summary:
Occurs when the user clicks the control.
<EventArgs> class Provides data for the <Event> event. ComponentRenameEventArgs class summary:
Provides data for the ComponentRename event.
Event-handler delegate class, specific to one event on a control Represents the callback method that will handle the <Event> event of a <Class>. PeekCompletedEventHandler delegate summary:
Represents the callback method that will handle the PeekCompleted event of a MessageQueue.
Event-handler delegate class, specific to multiple events on a control Represents the callback method that will handle the <Event1> event, <Event2> event, or <Event3> event of a <Class>. PrintEventHandler delegate summary:
Represents the callback method that will handle the BeginPrint event or EndPrint event of a PrintDocument.
Event-handler delegate class, specific to one event on multiple controls Represents the callback method that will handle the <Event> event of a <Class1> or a <Class2>. MeasureItemEventHandler delegate summary:
Represents the callback method that will handle the MeasureItem event of a ListBox, ComboBox, CheckedListBox, or MenuItem control.
Event-handler delegate class, generic Represents the callback method that will handle an event of a control. EventHandler Generic delegate summary
Represents the callback method that will handle the event.
On<Event> method* Raises the <Event> event. Control.OnBackgroundImageChanged method summary:
Raises the BackgroundImageChanged event.

* Note: In some cases, such as the WebPart class, a method named OnEventName might not raise the EventName event. For example, WebPart defines four methods named OnClosing, OnConnectModeChanged, OnDeleting, and OnEditModeChanged. Derived classes override these methods and provide special handling for the state transitions named by the methods. Thus, the description of the OnClosing method reads, "Enables derived classes to provide custom handling when a WebPart control is closed on a Web Parts page." The phrase in italics is the appropriate pattern for such summaries.
Because this naming pattern violates .NET naming guidelines, the writer should raise the naming issue in the design phase, if the opportunity arises. A name such as ClosingNotification or ClosingCallback would be more appropriate in this scenario.
Other special cases in WPF and Silverlight content use either "Provides class handling for the EventName routed event" or "Called before the EventName event occurs" for the summary.