Provides data for the item-clicked, item-double-clicked, item-left-clicked, item-left-double-clicked, item-right-clicked and item-right-double-clicked events.
Inheritance Hierarchy
Members
Show:
Constructors
Initializes a new instance of the ItemClickedEventArgs<T> class.
Initializes a new instance of the ItemClickedEventArgs<T> class.
Parameters
- item: T
- The item which is the subject of the event.
- context: IInputModeContext
- The context in which the click or tap occurred.
- location: Point
- The location.
- buttons: PointerButtons
- The pointer button(s) that have changed.
- clickCount: number
- The number of clicks.
- evt: PointerEventArgs
- The original pointer event args.
Properties
readonlyfinal
Property Value
true if the alt modifier was pressed; otherwise, false.Defined in
ClickEventArgs.altKeyThis can be used to distinguish between single and multiple clicks. Note that for compatibility reasons, a negative value means that no click count has been provided at event creation time.
readonlyfinal
Defined in
ClickEventArgs.clickCountGets the context for the current event.
Gets the context for the current event.
readonlyfinal
Property Value
true if the control modifier was pressed; otherwise, false.Defined in
ClickEventArgs.ctrlKeyClient code that is triggered by the event and does not want the event to become handled by other handlers should set this property to true to stop propagation of the event.
Note that this property needs to be set before the function synchronously returns. This means that setting the value in an async function after the first await or in an asynchronous callback, it cannot not be seen by the emitter of the event and the sender will consider the event as not being handled.
// wrong:
mode.addEventListener('item-clicked', async (evt) => {
await something()
evt.handled = true // will be set *after* all other event listeners have been invoked, only
})
// correct:
mode.addEventListener('item-clicked', async (evt) => {
evt.handled = true // will be set immediately and 'mode' will see the change
await something()
})final
Property Value
true if handled; false otherwise.See Also
Developer's Guide
Defined in
ClickEventArgs.handledGets the location of the click.
Gets the location of the click.
readonlyfinal
Property Value
true if the meta modifier was pressed; otherwise, false.Defined in
ClickEventArgs.metaKeyGets the state of the modifiers at the time of the click.
Gets the state of the modifiers at the time of the click.
Gets the pointer event args that caused this event.
Gets the pointer event args that caused this event.
readonlyfinal
Defined in
ClickEventArgs.originalEventArgsGets the PointerButtons that have changed for this event.
Gets the PointerButtons that have changed for this event.
readonlyfinal
Defined in
ClickEventArgs.pointerButtonsGets the type of the pointer that was the source of this event.
Gets the type of the pointer that was the source of this event.
readonlyfinal
Defined in
ClickEventArgs.pointerTypereadonlyfinal
Property Value
true if the shift modifier was pressed; otherwise, false.