Named Range Control Events

Table 7.1 shows the events that are available for a NamedRange control in VSTO.

Table 7.1. Events of the NamedRange Control

Event

Description

BeforeDoubleClick

Raised when the NamedRange control is double-clicked. The BeforeDoubleClick event handler enables you to take action when a user double-clicks text within a named range, before the default action for double-clicking the mouse button occurs.

BeforeRightClick

Raised when the NamedRange control is right-clicked. The BeforeRightClick event handler enables you to take action when a user right-clicks text within a named range, before the default action for the mouse right-click occurs.

BindingContextChanged

Raised when the binding context of the named range changes. The BindingContextChanged event handler enables you to take action when the BindingContext property of a named range is changed.

Change

Raised when the contents of the NamedRange are changed programmatically or by an end user. This event is not raised when a recalculation causes the range to change.

Deselected

Raised when a selection within a named range is moved outside the named range.

Disposed

Raised when the NamedRange is disposed of. This typically does not get raised until garbage collection is called to reclaim the memory that held the control.

Selected

Raised when the NamedRange is selected. The Selected event handler enables you to take action when focus is moved to the NamedRange.

SelectionChange

Raised when the selection within a NamedRange changes.

0 0

Post a comment