Skip to main content

MRUEdit.AddingMRUItem Event

Occurs before a new item is added to the MRU editor.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DXCategory("Events")]
public event AddingMRUItemEventHandler AddingMRUItem

Event Data

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

Property Description
AddReason Gets the reason that caused the AddingMRUItem event.
Cancel Gets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.

Remarks

The AddingMRUItem event is raised before a new item is added to the RepositoryItemMRUEdit.Items collection of a MRU editor. Handle this event to validate the item and cancel the operation if necessary. For instance, you can prevent numbers from being added.

The editor’s AddingMRUItem event is equivalent to the RepositoryItemMRUEdit.AddingMRUItem event available via the MRUEdit.Properties object, i.e. adding/removing an event handler for the current event actually affects the RepositoryItemMRUEdit.AddingMRUItem event.

Refer to the RepositoryItemMRUEdit.AddingMRUItem topic for more information.

See Also