Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8438237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:39:19+00:00 2026-06-10T07:39:19+00:00

I have a class GaugeScale that I made with a few properties. This class

  • 0

I have a class GaugeScale that I made with a few properties. This class contains the necessary information to display a complete Scale around a GDI+ drawn Gauge.

I have a Gauge control which uses a GaugeDrawer to render it’s frame.

The GaugeDrawer are Components which can be used at Designer time like regular components

The frame can be rendered by either a CircularGaugeDrawer (makes a fancy car RPM gauge) or by a ThermometerDrawer…

Anyway, both uses GaugeScale which have some complex properties (GaugeScaleInterval[] and float) and I would like to know if there is a way to allow the Designer of Visual Studio to instantiate and display those properties. It would make the creation of this control way less complex to the users.

So I’m wondering how could I teach the Designer how to use the Drawer components. If TypeConverter are the solution. How can I make them useful to the Designer of Visual Studio

EDIT:

This whole stuff targets WinForm environment.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:39:21+00:00Added an answer on June 10, 2026 at 7:39 am

    You’ve not said it, but I guess you are using WinForms (system.windows.forms).

    In this subject, TypeConverters usually convert textual/string representation to/from a concrete object that can be assigned to a property.

    Please see the article http://msdn.microsoft.com/en-us/magazine/cc164145.aspx – aside from showing int and enum properties, there’s also a nice introductory tutorial how to write a custom class Hand along with HandConverter and how to expose a property of usch type in the Properties window of the Forms Designer.

    Please note that the TypeConverter may be registered both at property level and ad the class level. The class-level is best for simple structures like custom numbers/colors/etc that will have a globally-universal converter. More complex cases may register different type converters at property level, so that three properties of the same type “Hand” may use different conversion logic.

    That’s for the TypeConverters. This is not the only option. The Properties window is more robust than just that. For example, you surely have seen the Color picker. Aside for the TypeConverters, you may also register Editors and, IIRC, even whole designers. See here for starters: http://msdn.microsoft.com/en-us/library/ms171840.aspx

    Side note:
    Although WinForms seems a little ‘dead’ after the WPF/XAML has exploded, that old framework and its design-time features are sometimes surprising on how much you can achieve. For example – XAML advertised new feature called “attached properties” – it is quite easy to implement them also here. Even the core localization components use that feature 🙂 However, this can be a quite unforgiving environment, and it is easy to make the VisualStudio unstable. Add to that the all-times-crappy .Designer.cs handling, and some parts of your form’s code may sometimes accidentially vanish. Please have backups before you play with editors. TypeConverters are much safer!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have class like this below shown. which contains the shopping items where the
I have class that looks like this: class A { public: class variables_map vm
I have class B that has class A, this is simplified version of class
I have class User that contains protected constructor and class Account that has access
I have class that extends 'IntentService' - this class occasionally receives data from a
I have class (MyCustomWebView) that extend webview can i do something like this ?
I have class, that contains different types and implements Iterable<Object> interface. But it is
I have class that extend FragmentActivity in it I add fragment to layout as
I have class grades that I need to check if a specific grade is
I have class ParentClass that observes an NSNotification. ParentClass handles the notification. ChildClass inherits

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.