How to make your own Custom UI Type Editor for Windows Forms Designer

Article ID: 2127711 - View products that this article applies to.
Expand all | Collapse all

On This Page

INTRODUCTION

This article describes an All-In-One Code Framework sample that is available for download. This code sample demonstrates how to create your own Custom UI Type Editor in Windows Forms Designer for a special property of your class.

Difficulty level
Collapse this imageExpand this image
2150612

Download information

To download this code sample, click the following link:

  


Technical overview

This sample creates your own TypeEditor that inherits from UITypeEditor for the property.  

Instruction:
  1. Open the solution and build all projects.
  2. Drag UC_CustomEditor from Visual Studio toolbox onto the test form (MainForm Form1).
  3. In the Visual Studio property window of UC_CustomEditor, locate a property that is named “Cls”.
    Collapse this imageExpand this image
    2160858
  4. Click the button of Cls property, the custom UI type editor form pops up. 
    Collapse this imageExpand this image
    2160859
  5. Click the OK button, the value will be written to the Cls property. 

Note For more information about how to create the sample application and how to deploy the sample application, see the Readme.txt file that is included in the download package.

Technology category

  • Windows Forms Control Designer

Languages

This code sample contains the following programming languages:

Collapse this tableExpand this table
LanguageProject Name
Visual C#CSWinFormDesignerCustomEditor
Visual Basic.NETVBWinFormDesignerCustomEditor

Prerequisites

  • This sample application was created by using Visual Studio 2008 with Service Pack 1 installed.

MORE INFORMATION

What is All-In-One Code Framework?

All-In-One Code Framework shows most Microsoft development techniques by using code samples in different programming languages. Each example is carefully selected, composed, and documented to show one common code scenario. For more information about All-In-One Code Framework, visit the following Web site:
http://1code.codeplex.com

How to find more All-In-One Code Framework samples

To find more All-In-One Code Framework samples, you can simply click the following link:
http://support.microsoft.com/gp/gp_kbcodefx

REFERENCES

For more information, visit the following Web sites:

http://msdn.microsoft.com/en-us/library/system.drawing.design.uitypeeditor.aspx


Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Properties

Article ID: 2127711 - Last Review: September 28, 2010 - Revision: 2.0
APPLIES TO
  • Microsoft Visual Studio 2008 Service Pack 1
Keywords: 
KB2127711

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com