Git Product home page Git Product logo

devexpress-examples / winforms-file-explorer-breadcrumb-folder-nav Goto Github PK

View Code? Open in Web Editor NEW
0.0 57.0 0.0 68 KB

Create a folder navigation bar inspired by Windows File Explorer.

License: Other

C# 83.20% Visual Basic .NET 16.80%
dotnet xtraeditors-library winforms breadcrumb-navigation file-browser file-browser-integration file-explorer windows-forms folder-navigation windows-folder-navigation

winforms-file-explorer-breadcrumb-folder-nav's Introduction

WinForms Breadcrumb Editor - Create a folder navigation bar (File Explorer)

This example demonstrates how to use the WinForms Breadcrumb Editor to create a folder navigation bar inspired by Microsoft Windows File Explorer.

WinForms Breadcrumb Editor - Create a folder navigation bar

Two root nodes ('Root' and 'Computer') are created at design time. Their BreadCrumbNode.Persistent and BreadCrumbNode.PopulateOnDemand properties are set to true. The Root node stores shortcuts to most important directories (Desktop, Windows, Program Files). The Computer node allows users to quickly navigate through local disks via related shortcuts.

void InitBreadCrumbRootNode(BreadCrumbNode node) {
    node.ChildNodes.Add(new BreadCrumbNode("Desktop", Environment.GetFolderPath(Environment.SpecialFolder.Desktop)));
    node.ChildNodes.Add(new BreadCrumbNode("Windows", Environment.GetFolderPath(Environment.SpecialFolder.Windows)));
    node.ChildNodes.Add(new BreadCrumbNode("Program Files", Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)));
}
void InitBreadCrumbComputerNode(BreadCrumbNode node) {
    foreach (DriveInfo driveInfo in GetFixedDrives()) {
        node.ChildNodes.Add(new BreadCrumbNode(driveInfo.Name, driveInfo.RootDirectory));
    }
}

The following events are handled to dynamically generate the Nodes tree according to the folder structure:

Files to Review

Documentation

See Also

winforms-file-explorer-breadcrumb-folder-nav's People

Contributors

albertov05 avatar devexpressexamplebot avatar iam0k avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.