locked
How to change the name in the ComboBox above the PropertyGrid? RRS feed

  • Question

  • Hello everyone!

    I hope you could help me. I have implemented a new TreeView within Visual Studio and if I click on one item of this TreeView the Property-Window should be displayed.

    This works fine, but the problem is, that I could not change the display name of the property window. There is always the Class name and the Namespace of the property displayed.

    E.g. Property Class

    namespace TestNameSpace.Test2
    {
       public class APropertyClass
       {
           [Category("General Properties")]
           [Description("Sets/Displays the name")]
           public String Name
           {
              get { ... };
              set { ... };
           }
       }
    }

    -----

    The "Name" is displayed correct, but there is a ComboBox above the PropertyGrid which displays "TestNameSpace.Test2.APropertyClass".

    How could I change this???

    I have tried to set the [DisplayName("...")] attribute to the property class "APropertyClass", but this does not work.

    Thanks a lot,
    Stefan


    Tuesday, May 24, 2011 9:40 AM

Answers

  • Hi Stefan,

    If you could provide a bit more context, that would be great. For example, steps to repro. If you're implementing a package or addin, or if you are just attempting to utilize the existing winform designer.

    Thanks,


    Ed Dore
    Thursday, June 2, 2011 10:31 PM

All replies

  • Hello Stefan,

     

    Thank you for your question.

     

    I am currently looking into this issue and will give you an update as soon as possible.

     

    Thank you for your understanding and support.

     

    Best Regards,

    Ziwei Chen

     

     


    Ziwei Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, May 25, 2011 8:37 AM
  • Hello,

    I should mention that I use VS2005.

    Best regards,
    Stefan

    Wednesday, May 25, 2011 8:40 AM
  • Hi Stefan,

    Need some additional details here. Are you trying to extend VS in some manner? (with a custom toolwindow or designer for example).

    Typically, the properties toolwindow is populated via the automation properties exposed by the object you add to the given selection. But I"m unclear as to whether this is what your doing, or if you are just using the default winform designer functionality.

    Ed...

     


    Ed Dore
    Tuesday, May 31, 2011 10:43 PM
  • Hi Stefan,

    If you could provide a bit more context, that would be great. For example, steps to repro. If you're implementing a package or addin, or if you are just attempting to utilize the existing winform designer.

    Thanks,


    Ed Dore
    Thursday, June 2, 2011 10:31 PM