Skip to main content

RepositoryItemMRUEdit.AddingMRUItem Event

Occurs before an item is added to the MRU editor.

Namespace: DevExpress.XtraEditors.Repository

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 an item is added to the RepositoryItemMRUEdit.Items collection of a MRU editor. You can provide an event handler for this event to perform actions when adding a new item. For instance, you can examine the item for validity and cancel if the item does not meet requirements.

The AddingMRUItem event provides an argument of the AddingMRUItemEventArgs type. Use properties exposed by this argument to obtain the new item and to cancel the operation, if necessary.

A MRU editor’s MRUEdit.AddingMRUItem event is an equivalent of the current event.

See Also