Skip to main content
All docs
V23.2

BrowsePathEdit.PathIconSelector Property

Gets or sets the selector that allows you to choose a path icon based on custom logic. This is a dependency property.

Namespace: DevExpress.Xpf.Editors

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

NuGet Package: DevExpress.Wpf.Core

Declaration

public IPathIconSelector PathIconSelector { get; set; }

Property Value

Type Description
DevExpress.Xpf.Editors.IPathIconSelector

The selector that allows you to choose a path icon based on custom logic.

Remarks

The following code sample changes the icon displayed for folders:

BrowsePathEdit - PathIconSelector

<Window.Resources>
    <local:IconSelector x:Key="iconSelector"/>
</Window.Resources>

<!-- ... -->

<dxe:BrowsePathEdit DialogType="Folder" PathIconSelector="{StaticResource iconSelector}">
using DevExpress.Xpf.Editors;
using System.IO;
using System.Windows.Media;
using System.Windows.Media.Imaging;
// ...

public class IconSelector : IPathIconSelector {
    public ImageSource Select(string path) {
        if (Directory.Exists(path))
            return new BitmapImage(new System.Uri("pack://application:,,,/Open_16x16.png"));
        return null;
    }
}
See Also