[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Expand]Controls and Libraries
 [Collapse]Common Features
  [Expand]Data Binding Common Concepts
  [Expand]Data Source Wizard
    File and Folder Browser Behaviors
    Persistence Behavior
    Indicator Behaviors
    Stub Glyph Behavior
    Banner Behavior
    Breadcrumb Behavior
    Disabled Cell Behavior
    Drag-and-Drop Behavior
    Magnifier Behavior
    Pager Navigation Behavior
    Scrollbar Annotation Behavior
    Snap Window Behavior
  [Expand]Application Appearance and Skin Colors
  [Expand]Filtering UI Context
   Find Panel Syntax
  [Expand]Graphics Performance and High DPI
  [Expand]Scaffolding Wizard
  [Expand]Formatting Values
   HTML-inspired Text Formatting
  [Expand]Tooltip Management
  [Expand]Save and Restore Layouts
   Clipboard - Copy and Paste Operations. Data Formatting
   Version Compatibility: Default Property Values
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

File and Folder Browser Behaviors

This document gathers multiple similar Behaviors that solve various tasks related to browsing and selecting files and folders.

Note that each behavior inherits the preceding behavior's features on this list. Do not attach, for instance, a File Path Behavior to ButtonEdit if this editor already has the Open File Behavior attached.

Expanded File Icon Behavior

This behavior checks the displayed text of a target control and if this text is a path to an existing file or folder, adds its icon to the control. The following figure illustrates multiple label controls with this behavior attached to them.

Supported controls

Behavior options

  • ShowIcon - enables or disables the behavior.
  • IconSize - allows you to select the required size for file (folder) images: small, medium, large or extra large.

    The default height of text box editors equals 20 pixels, which allows them to display only small icons. To display icons of other sizes, turn the RepositoryItem.AutoHeight property off and increase the editor's height by using the Size property.

  • InvalidPathImage - an icon that will be displayed when the target control does not display a valid file (folder) path. The assigned image is shown as is and does not scale in accordance to the IconSize setting.

Expanded File Path Behavior

Provides an auto-complete feature for the editor this behavior is attached to. Using this feature end-users can quickly enter file and/folder paths. Once a valid path is entered, its icon is displayed next to the editor's text.

To navigate through proposed auto-complete options, end-users can press Tab.

Supported controls

Behavior options

  • IconSize, InvalidPathImage - same as for the File Icon Behavior.
  • Mode - specifies whether the auto-complete feature proposes only folder paths, only file paths or both of them.
  • Filter - allows you to narrow auto-complete hints to a specific folder or file. For example, if this property is set to "Windows\Globalization\Time Zone", browsing the folder hierarchy on a system disc drive will instantly bring end-users to this folder.

Expanded Open File and Open Folder Behaviors

These behaviors instantly turn your editor into a file or a folder selector. The editor button invokes a dialog that allows you to select a file or a folder, depending on which behavior you have attached. The path and the icon of the object selected in this dialog are then shown by the editor.

Supported controls

Behavior options

  • ShowIcon, IconSize, InvalidPathImage - same as for the File Icon Behavior.
  • DialogStyle - allows you to choose the dialog type and style:

    • Standard - the target control invokes default Visual Studio FolderBrowser dialogs;
    • Skinnable - the target control invokes skinnable DevExpress dialogs;
    • SkinnableWide and SkinnableCompact - these values are available for the Open Folder behavior only and allow you to choose between the "Wide" and "Compact" dialog styles (see the XtraFolderBrowserDialog.DialogStyle property);

Is this topic helpful?​​​​​​​