Section 12.3. Event Reference


12.3. Event Reference

Click

Routed Event

Yes

Elements

 MenuItem Hyperlink ButtonBase 

Description

Click is raised on an element's MouseLeftButtonDown and MouseRightButtonDown events.

Event Argument Type

 RoutedEventArgs 

Closed

Routed Event

Yes

Elements

 ContextMenu ToolTip Popup Pag Windo NavigationWindow 

Description

Closed is raised when the element has closed.

Event Argument Type

 RoutedEventArgs 

DragEnter

Routed Event

Yes

Elements

 UIElement 

Description

DragEnter is raised when an underlying system drag event is raised, with either this element or a child element along the route as the target. The corresponding event is PreviewDragEnter.

Event Argument Type

 RoutedEventArgs 

DragLeave

Routed event

Yes

Elements

 UIElement 

Description

DragLeave is raised when an underlying system drag event is raised, with either this element or a child element along the route identified as the origin. The corresponding event is PreviewDragLeave.

Event Argument Type

 RoutedEventArgs 

DragOver

Routed Event

Yes

Elements

 UIElement 

Description

DragOver is raised when an underlying system drag event is raised, with either this element or a child element along the route as the target. The corresponding event is PreviewDragOver. This event is raised even if the origin of the drag event is within the boundaries of the element.

Event Argument Type

 RoutedEventArgs 

Drop

Routed Event

Yes

Elements

 UIElement 

Description

Drop is raised when an underlying system drop event is raised, with either this element or a child element along the route as the target. The corresponding event is PreviewDrop.

Event Argument Type

 RoutedEventArgs 

GotFocus

Routed Event

Yes

Elements

 UIElement 

Description

GotFocus is a routed event that occurs when the element receives focus. The corresponding event is PreviewGotFocus. It uses a bubbling event strategy.

Event Argument Type

 RoutedEventArgs 

IsCheckedChanged

Routed event

Yes

Elements

 ToggleButton MenuItem 

Description

IsCheckedChanged is raised when the IsChecked attribute of an element changes state.

Event Argument Type

 RoutedEventArgs 

IsEnabledChanged

Routed event

No

Elements

 UIElement 

Description

IsEnabledChanged is raised when the IsEnabled attribute of an element changes state.

Event Argument Type

 DependencyPropertyChangedEventArgs 

IsFocusChanged

Routed event

No

Elements

 UIElement 

Description

IsFocusChanged is raised when the IsFocused attribute of an element changes state.

Event Argument Type

 DependencyPropertyChangedEventArgs 

IsMouseDirectlyOverChanged

Routed event

No

Elements

 UIElement 

Description

IsMouseDirectlyOverChanged is raised when the IsMouseDirectlyOver attribute of an element changes state.

Event Argument Type

 DependencyPropertyChangedEventArgs 

IsVisibleChanged

Routed event

No

Elements

 UIElement 

Description

IsVisibleChanged is raised when the IsVisible attribute of an element changes state.

Event Argument Type

 DependencyPropertyChangedEventArgs 

KeyDown

Routed Event

Yes

Elements

 UIElement 

Description

KeyDown is raised when a key is pressed while the element or a child element has focus. KeyDown uses a bubbling event strategy. The corresponding event is PreviewKeyDown.

Event Argument Type

 KeyEventArgs 

KeyUp

Routed Event

Yes

Elements

 UIElement 

Description

KeyUp is raised when a key is released while the element or a child element has focus. KeyUp uses a bubbling event strategy. The corresponding event is PreviewKeyUp.

Event Argument Type

 KeyEventArgs 

LayoutUpdated

Routed event

No

Elements

 UIElement 

Description

LayoutUpdated is raised when the layout of the element has been altered because a property, such as Width or Content, was changed; because a window was resized; or because the user specifically requested the layout update.

Event Argument Type

 DependencyPropertyChangedEventArgs 

LostFocus

Routed Event

Yes

Elements

 UIElement 

Description

LostFocus is a routed event that occurs when the element loses focus. The corresponding event is PreviewLostFocus. It uses a bubbling event strategy.

Event Argument Type

 RoutedEventArgs 

MouseEnter

Routed Event

Yes

Elements

 UIElement 

Description

MouseEnter is raised when the mouse pointer enters the boundaries of the element to which it is attached. It uses a direct routing strategy, so it is handled only in the element in which it was raised, but it does enable other routed event behaviors (such as event triggers in styles).

Event Argument Type

 RoutedEventArgs 

MouseLeave

Routed Event

Yes

Elements

 UIElement 

Description

MouseLeave is raised when the mouse pointer leaves the boundaries of the element to which it is attached. It uses a direct routing strategy, so it is handled only in the element in which it was raised, but it does enable other routed event behaviors (such as event triggers in styles).

Event Argument Type

 MouseEventArgs 

MouseMove

Routed Event

Yes

Elements

 UIElement 

Description

MouseMove is raised when the mouse pointer moves over the element or a child element along the route. It uses a bubbling strategy. The corresponding event is PreviewMouseMove.

Event Argument Type

 MouseEventArgs 

MouseLeftButtonDown

Routed Event

No

Elements

 UIElement 

Description

MouseLeftButtonDown is raised when the left mouse button is clicked over an element.

Event Argument Type

 MouseButtonEventArgs 

MouseLeftButtonUp

Routed Event

No

Elements

 UIElement 

Description

MouseLeftButtonUp is raised when the left mouse button is released while it is over the element.

Event Argument Type

 MouseButtonEventArgs 

MouseRightButtonDown

Routed Event

No

Elements

 UIElement 

Description

MouseRightButtonDown is raised when the right mouse button is clicked while it is over the element.

Event Argument Type

 MouseButtonEventArgs 

MouseRightButtonUp

Routed Event

No

Elements

 UIElement 

Description

MouseRightButtonUp is raised when the right mouse button is released while it is over an element.

Event Argument Type

 MouseButtonEventArgs 

Opened

Routed Event

Yes

Elements

 ContextMenu Popup Tooltip 

Description

Opened is raised when the element opens.

Event Argument Type

 RoutedEventArgs 

SelectionChanged

Routed event

Yes

Elements

 TextBoxBase Selector 

Description

SelectionChanged is raised whenever a selection is changed, whether through binding, user interaction, or programmatically. It uses a bubble routing strategy.

Event Argument Type

 SelectionChangedEventArgs 

ScrollChanged

Routed Event

Yes

Elements

 ScrollViewer 

Description

ScrollChanged is raised when the scroll state has changed.

Event Argument Type

 ScrollChangedEventArgs 

TextChanged

Routed Event

Yes

Elements

 TextBoxBase 

Description

TextChanged is raised when the text in the element changes either through user interaction or programmatically. This is raised even when the element is initially created and the text is populated.

Event Argument Type

TextChangedEventArgs




XAML in a Nutshell
XAML in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596526733
EAN: 2147483647
Year: 2007
Pages: 217

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net