Category / Section
How to achieve Windows Explorer like appearance using Syncfusion controls?
1 min read
Appearance
Windows Explorer like appearance can be achieved by using Syncfusion control named NavigationView that helps to showcase Address Bar appearance and by using controls named TreeView and ListView.
C#
// To get directories and files of the System DirectoryInfo dir = new DirectoryInfo("C:\\"); foreach (DirectoryInfo dire in dir.GetDirectories()) { TreeNode tree = new TreeNode(dire.Name); e.Node.Nodes.Add(tree); } foreach (FileInfo f in dir.GetFiles()) { TreeNode t = new TreeNode(f.Name); e.Node.Nodes.Add(t); }
VB
'To get directories and files of the System Dim dir As New DirectoryInfo("C:\") For Each dire As DirectoryInfo In dir.GetDirectories() Dim tree As New TreeNode(dire.Name) e.Node.Nodes.Add(tree) Next dire For Each f As FileInfo In dir.GetFiles() Dim t As New TreeNode(f.Name) e.Node.Nodes.Add(t)
Figure 1. Windows Explorer like appearance using Syncfusion control with image.
Samples:
C#: How to achieve Windows Explorer like appearance using Syncfusion controls?
VB: How to achieve Windows Explorer like appearance using Syncfusion controls?