Visual Studio Extensibility Property Window

Posted on 2008-11-03
Last Modified: 2013-12-17

I have custom objects that I am developing in my own Visual Studio DSL project.  One of these objects has a property that is a UNC file location.  In runtime mode, when a file is selected I am display the properties for that object in the property window - everything works great.

The problem I am having is that when a user selects an object and the properties are displayed, how can I force the filepath property to show an ellipses in the property window and when the ellipses is clicked to display and OpenFileDialog box?


Neal Jackson
Question by:njackson60
    LVL 96

    Accepted Solution

    It sounds like you need the FileNameEditor attribute for your property:

    FileNameEditor Class

    [EditorAttribute(typeof(System.Windows.Forms.Design.FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
    public string testFilename
        get { return filename; }
        set { filename = value; }
    private string filename;
    LVL 2

    Author Closing Comment

    Thank you!  This was THE PERFECT solution.  I appreciate your time.


    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
    Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
    The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now