Back to Devexpress

PropertyGridControl.ProcessEditorActivationAction Event

wpf-devexpress-dot-xpf-dot-propertygrid-dot-propertygridcontrol-770de869.md

latest8.7 KB
Original Source

PropertyGridControl.ProcessEditorActivationAction Event

Allows you to prohibit the focused editor to process an activation action.

Namespace : DevExpress.Xpf.PropertyGrid

Assembly : DevExpress.Xpf.PropertyGrid.v25.2.dll

NuGet Package : DevExpress.Wpf.PropertyGrid

Declaration

csharp
public event EventHandler<ProcessEditorActivationActionEventArgs> ProcessEditorActivationAction
vb
Public Event ProcessEditorActivationAction As EventHandler(Of ProcessEditorActivationActionEventArgs)

Event Data

The ProcessEditorActivationAction event's data class is ProcessEditorActivationActionEventArgs. The following properties provide information specific to this event:

PropertyDescription
ActivationActionGets an activation action. Inherited from ActivationActionEventArgsBase.
HandledGets or sets a value that indicates the present state of the event handling for a routed event as it travels the route. Inherited from RoutedEventArgs.
KeyDownEventArgsGets event arguments for the KeyDown and KeyUp activation actions. Inherited from ActivationActionEventArgsBase.
MouseLeftButtonEventArgsGets event arguments for the MouseLeftButtonDown and MouseLeftButtonUp activation actions. Inherited from ActivationActionEventArgsBase.
OriginalSourceGets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class. Inherited from RoutedEventArgs.
RaiseEventAgainGets or sets whether the event is raised again to make the focused editor process an activation action.
RoutedEventGets or sets the RoutedEvent associated with this RoutedEventArgs instance. Inherited from RoutedEventArgs.
RowGets a property grid row. Inherited from PropertyGridRowBaseEventArgs.
SourceGets or sets a reference to the object that raised the event. Inherited from RoutedEventArgs.
TemplateChildGets an in-place editor specified in a cell template. Inherited from ActivationActionEventArgsBase.
TextInputEventArgsGets event arguments for the TextInput activation action. Inherited from ActivationActionEventArgsBase.
ValueGets a row’s value. Inherited from PropertyGridRowBaseEventArgs.

The event data class exposes the following methods:

MethodDescription
InvokeEventHandler(Delegate, Object)When overridden in a derived class, provides a way to invoke event handlers in a type-specific way, which can increase efficiency over the base implementation. Inherited from RoutedEventArgs.
OnSetSource(Object)When overridden in a derived class, provides a notification callback entry point whenever the value of the Source property of an instance changes. Inherited from RoutedEventArgs.

Remarks

A user can activate the property definition’s in-place editor in the following ways:

  • Click the value cell.
  • Press Enter.
  • Press F2.
  • Start typing.

When a user activates an editor, the PropertyGridControl passes the activation action to the editor. To prohibit the editor to process the action, handle the ProcessEditorActivationAction event and set the RaiseEventAgain property to false.

Example

The following code sample divides user actions: the first click activates the editor, and the second interacts with the editor:

csharp
void OnProcessEditorActivationAction(object sender, DevExpress.Xpf.PropertyGrid.ProcessEditorActivationActionEventArgs e) {
    if (e.ActivationAction == ActivationAction.MouseLeftButtonDown)
        e.RaiseEventAgain = false;
}
vb
Private Sub OnProcessEditorActivationAction(ByVal sender As Object, ByVal e As DevExpress.Xpf.PropertyGrid.ProcessEditorActivationActionEventArgs)
    If e.ActivationAction = ActivationAction.MouseLeftButtonDown Then e.RaiseEventAgain = False
End Sub

Process User Actions

The PropertyGridControl includes the following events that allow you to specify how users can interact with editors:

EventDescription
GetIsEditorActivationActionAllows you to specify whether an action (key down, text input, or mouse left button click) activates the focused editor.
ProcessEditorActivationActionAllows you to prohibit the focused editor to process an activation action.
GetActiveEditorNeedsKeyAllows you to specify whether an active editor responds to keys that a user presses.

See Also

Customize Properties

PropertyGridControl Class

PropertyGridControl Members

DevExpress.Xpf.PropertyGrid Namespace