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. .NET (Core and Framework)
  4. Can a non-Component class have design time "Name" property?

Can a non-Component class have design time "Name" property?

Scheduled Pinned Locked Moved .NET (Core and Framework)
visual-studioquestioncsharpdesigndata-structures
1 Posts 1 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.
  • K Offline
    K Offline
    kmansari
    wrote on last edited by
    #1

    Gurus, Help!! This is what I am trying to do: I have business objects that derive from a common base class. I have implemented my custom UITypeEditor (based on a TreeView) that lets edit these objects at design time. Visual Studio happily generates the code required to instantiate the tree hierarchy at run-time. So far so good. However, the variable names it assigns to these objects follows the pattern: <type_name>[1,2,...n]. Examples: reportExporter1, reportExporter2...., logGenerator1, logGenerator2,.... etc. I want the users to be able to specify variable names of their choice at design time. The easiest way would be to derive these classes from Component. However, I am NOT allowed to make them into components. So the question goes: Can a class instance have a Name property associated with it such that the Visual Studio Designer would use its value rather than generate its own default string for the name? If so, how? I am using VS 2005. Thanks a lot in advance! -Kamran

    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