Skip to main content
All docs
V23.2

BrowsePathEdit.DialogClosed Event

Occurs when a user closes the browse dialog.

Namespace: DevExpress.Xpf.Editors

Assembly: DevExpress.Xpf.Core.v23.2.dll

NuGet Package: DevExpress.Wpf.Core

Declaration

public event EventHandler<DialogClosedEventArgs> DialogClosed

Event Data

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

Property Description
DialogResult Gets whether a file/folder was selected in the dialog.
Handled Gets 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.
OriginalSource Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class. Inherited from RoutedEventArgs.
ReadOnlyChecked Gets whether the Open as read-only check box is checked.
RoutedEvent Gets or sets the RoutedEvent associated with this RoutedEventArgs instance. Inherited from RoutedEventArgs.
Source Gets or sets a reference to the object that raised the event. Inherited from RoutedEventArgs.

The event data class exposes the following methods:

Method Description
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

The following code sample shows only a file name in the BrowsePathEdit when a user selects a file in the browse dialog:

BrowsePathEdit - DialogClosed Event

<dxe:BrowsePathEdit ShowIcon="False" DialogClosed="OnDialogClosed">
using DevExpress.Xpf.Editors;
using System.IO;
// ...

void OnDialogClosed(object sender, DialogClosedEventArgs e) {
    if (e.DialogResult == true)
        ((BrowsePathEdit)e.Source).Text = Path.GetFileName(((BrowsePathEdit)e.Source).Text);
}
See Also