Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. PropertyGrid and Custom properties

PropertyGrid and Custom properties

Scheduled Pinned Locked Moved C#
tutorialquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mark F
    wrote on last edited by
    #1

    I have a custom property that has two string values and an int value. I need to display them in a PropertyGrid so that the property's UITypeEditor edits any of the three properties within that type. An example would be the "Font" type in a PropertyGrid. The name, size, unit, bold, etc. is part of the editor for that property type. Is PropertyDescriptor what I need? Thanks, Mark

    U 1 Reply Last reply
    0
    • M Mark F

      I have a custom property that has two string values and an int value. I need to display them in a PropertyGrid so that the property's UITypeEditor edits any of the three properties within that type. An example would be the "Font" type in a PropertyGrid. The name, size, unit, bold, etc. is part of the editor for that property type. Is PropertyDescriptor what I need? Thanks, Mark

      U Offline
      U Offline
      User 4467139
      wrote on last edited by
      #2

      Try [BrowsableAttribute(true)] above your property description

      M 1 Reply Last reply
      0
      • U User 4467139

        Try [BrowsableAttribute(true)] above your property description

        M Offline
        M Offline
        Mark F
        wrote on last edited by
        #3

        I think you misunderstood my question. I need to add an expandable property like the Font property has when displayed in a PropertyGrid. MyProperty Category + MyProperty my property's value string Size size value color color value name name value etc...., How is this done? Thanks, Mark

        U 1 Reply Last reply
        0
        • M Mark F

          I think you misunderstood my question. I need to add an expandable property like the Font property has when displayed in a PropertyGrid. MyProperty Category + MyProperty my property's value string Size size value color color value name name value etc...., How is this done? Thanks, Mark

          U Offline
          U Offline
          User 4467139
          wrote on last edited by
          #4

          I think you looking for TypeConverterAttribute and ExpandableObjectConverter. The following link shows how to do it. <a href="http://msdn.microsoft.com/en-us/library/aa302326.aspx"> <a href="http://msdn.microsoft.com/en-us/library/ayybcxe5.aspx">

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups