IExtenderProvider - A little more style?

Posted on 2005-04-26
Last Modified: 2012-06-21
I dont know if this is possible as I cant seem to find a lot of documentation on the subject but the scenario is as follows.

I have a custom control that when dropped into a form gives all the controls on it a new property.  This property is something akin to a help text field but there is a reason for reinventing the wheel :o)

Everything works fine and in design view any controls on the form have this property now but it is a text entry box.  What I would REALLY like to do is replace that text entry box with a button style one that allows to me to display a custom form and capture the results of that.  Something like when you define the columns in a listview.

Any thoughts appreciated.

Question by:Kh3ldar
    LVL 96

    Expert Comment

    by:Bob Learned
    IExtenderProvider is used to give additional properties to a control, such as what the ToolTip provider does.

    Is that what you want to accomplish?  Or do you want to design a custom property designer (like the TextAlign/ImageAlign property editor)?

    LVL 4

    Author Comment

    Hi LearnedOne.

    I beleive from your description I am trying to do both (they appear to be the same thing just done a different way)?

    I currently have the custom properties for my controls using IExtenderProvider, they are called HelpProvider_OnFocus_Text.  You can enter text in them (like a ToolTip entry field) in the properties pane and its all saved and does it relevant things when the program is compiled.

    What I would like to do is enter rich text or HTML rather than just plain text and typing this into that little textbox on the properties pane will get very frustrating.  The best example I can demonstrate is if you click into something like the Icon property for a form you get an open file dialog and you choose the icon.  The path of the image is then passed back into the properties box. I do not want to open a file using a standard dialog however I want to open a Custom form of my own (rich text / html creation form) - allow the user to enter the relevant text in there and then pass it back to the properties field.  Other examples of this would be the Dock property or the Transparancy key. (Little more elaborate than I intend to do, I just want to open another form)

    I hope this is a little clearer.

    LVL 96

    Accepted Solution

    An example of using the EditorAttribute to create a custom property editor:

    The ColorPicker WinForms Control:

    <EditorAttribute("System.Drawing.Design.ColorEditor"), GetType(System.Drawing.Design.UITypeEditor))>


    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Article by: Ivo
    Anonymous Types in C# by Ivo Stoykov Anonymous Types are useful when  we do not need to follow usual work-flow -- creating object of some type, assign some read-only values and then doing something with them. Instead we can encapsulate this read…
    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    746 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