0

Hi programmers!)
I'm developing a custom component and I can't understand - how to make a property which can show a window with options like "font" property for button, for example ?
please tell how to do this from where i can find it out.

big thanks in advance))

4
Contributors
13
Replies
14
Views
6 Years
Discussion Span
Last Post by vedro-compota
Featured Replies
  • What tools are you using? Are you using WPF and XAML? And yes, could you please explain a little bit more? Read More

  • 1
    Narue 5,707   6 Years Ago

    I suspect what you want are [URL="http://msdn.microsoft.com/en-us/library/tk67c2t8(v=VS.100).aspx"]property attributes[/URL] that affect how the property is displayed in a property grid control. If your class is more than just a design-time component, you can also make use of the [URL="http://msdn.microsoft.com/en-us/library/aa302326.aspx"]PropertyGrid control[/URL] directly in your own applications. Read More

1

What tools are you using? Are you using WPF and XAML? And yes, could you please explain a little bit more?

Votes + Comments
++++++
0

What tools are you using? Are you using WPF and XAML? And yes, could you please explain a little bit more?

I use only VS express edition (as I think - in reality the situation can be different...)))
WPF and XAML - no use (as I think too...)

And yes, could you please explain a little bit more?

component "Button" has a property "Font" which value you can change after click on small button with 3 points- (...) - after click on it VS will show additional window with font options.....
is there a way to add a property to custom component which can be changed like "Font" for "Button"?

0

Ok, I think I understand what you are asking and my answer is yes. I am going to assume you created a windows forms project, and the properties that are available are what you get to work with as a default. You would be able to create a new class that inherits from a control, say "Button", and add additional properties. So your "Button" already has a "Font" property, but if you derived a new class from "Button", you could add any kind of property you want. Do you know what inheritance is?

0

LevyDee , I don't need font property for my component - I need additional window in which user can for example choose the color of brush - yes, certainly he can do it in standart property window (View->Properties window - in VS) , but I want exactly additional window))) (like "Font" can show after double click on the value of font property)

0

or may be you want a smart Tage ..
like this the one in attachement

sandeepparekh9 I've figured out what was wrong) thank you, friend)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.