UIElements includes an event systemA way of sending events to objects in the application based on input, be it keyboard, mouse, touch, or custom input. The Event System consists of a few components that work together to send events. More info
See in Glossary that communicates user interactions to visual elements. Inspired by HTML events, the UIElements events system shares many of the same terminology and event naming. The UlElement event system is comprised of the following:
EventBaseand grouped into families. Each family of events implements an interface that defines the common characteristics for all events of the same family. For example,
MouseDownEventand other mouse events implement the
IMouseEventinteface. This interface specifies that each mouse event has a position, a pressed button, a set of modifers, and other mouse-related event types. See Event type reference for a description of each event family and their UIElement event types.
You can also use events to communicate other types of messages to visual elements. For example, the
ContextualMenuManager uses the
ContextualMenuPopulateEvent to add items to a contextual menu. See built-in controls.