Introduction
File and Folder Listview is a simple component that I made as an alternative to OpenFileDialog or CommonOpenFileDialog that does not support selecting both File or Folder.
In the standard controls, we use OpenFileDialog to select Files and we use FolderDialog to select Folders. Other common controls released by Microsoft was the CommonOpenFileDialog available in WindowsAPICodePack. The UI looks like the standard OpenFileDialog but it can also select Folders if "IsFolderPicker" property is set to true. But one thing these standard controls cannot do is to the ability to select both File or Folder
Using the code
In your project, add FileFolderList.cs and drag the control in your form or in any container. FileFolderList is using ListView as it's base class so all the properties, method, and events of the ListView are available.
FileFolderList has 3 custom properties
- string DefaultPath {get;set;}
- string SelectedPath {get;}
- bool isSoloBrowser {get;set;}
// - when true, it will add "..." so you can go back to the parent folder
and 2 custom methods
- void Load()
call this method when your form has loaded - void Browse(string path)
Adding the control programatically can be done in this way
GCS.Windows.Forms.FileFolderList ffl = new GCS.Windows.Forms.FileFolderList();
ffl.View = View.Details;
ffl.Load();
ffl.Dock = DockStyle.Fill;
this.Controls.Add(ffl);
Points of Interest
FileFolderList uses BackgroundWorker object to load the associated icons in a separate thread.
History
this is my initial release
I am an experienced Applications Developer and had worked professionally for over 6 years. I have been writing codes and building different applications for over 13+ years. My work is mostly for Microsoft technologies such as .NET. Yes I am Microsoft technology enthusiast.
My field of expertise in .NET technology are Desktop and Windows Mobile and Windows Phone. I occasionally write ASP.NET too for clients.
I have wide experience of different programming languages and scripts such as: Turbo Pascal, Batch Scripts, C/C++, Visual Basic Classic, Visual Basic .NET, Java, HTML, CSS, ASP Classic, VB Script, ASP.NET, T-SQL, MySQL, PHP, C#, Javascript, jQuery, HTML5, RegEx, XAML, XML, JSON, and XPath
I am also experienced in different platforms such as: Google Data API, Google Map API, Twitter API, Facebook API, Flickr API, Skydrive API, SVN, GitHub, Drupal, and Orchard.
I am interested in Microsoft technologies, User Experience and User Interfaces, Algorithms, Robotics, Astronomy, Architecture, Electrical, Mechanics, and Extra Therestrial Life on other planets.
I am also offering free coding and application development consultations with students having a problem with their Thesis projects.
View my full Curriculum Vitae here
http://ss.jaysonragasa.net/?mycv