Property grid, directory browse functionality



Hi! How can I implement Directory Browse functionality in the PropertyGrid
control similar to BackgroundImage or Icon in VS 2005 ?
I can not find any info on that. May be I should be more generic and ask how
I can lunch a custom form from the PropertyGrid control ? I searched for it
with no result.

Any idea/sample/url is greatly appreciated.

Many thanks in advance,



Bob Powell [MVP]

You can implement your own UITypeEditor that shows a dialog instead of a
popup. In the editor itself you would show a file-open dialog.

You can then use a string property in your data object and decorate the
property with the EditorAttribute specifying your own UITypeEditor.

The PropertyGrid will do the rest...

Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting

Find great Windows Forms articles in Windows Forms Tips and Tricks

Answer those GDI+ questions with the GDI+ FAQ

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

Robbe Morris - [MVP] C#

Check the link in my signature for an easy to implement
advanced UITypeEditors.


Hello Mike,

if you need some articles about the UItypeEditor, visit the
PropertyGrid Resource List (filter by tag):

Best regards,

Nicolas Cadilhac @ VisualHint (
Home of Smart FieldPackEditor.Net / DateTimePicker replacement (http://
Home of Smart PropertyGrid for .Net and MFC (
Microsoft PropertyGrid Resource List -



G Himangi

You can apply the .net FileNameEditor attribute for the property

- G Himangi, Sky Software
Shell MegaPack : GUI Controls For Drop-In Windows Explorer like Shell
Browsing Functionality For Your App (.Net & ActiveX Editions).
EZNamespaceExtensions.Net : Develop namespace extensions rapidly in .Net
EZShellExtensions.Net : Develop all shell extensions,explorer bars and BHOs
rapidly in .Net

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question