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. Hide Name

Hide Name

Scheduled Pinned Locked Moved C#
design
3 Posts 3 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.
  • T Offline
    T Offline
    Tanuja123
    wrote on last edited by
    #1

    I am creating custom control.I am hiding all base class properties and displaying only custom properties.But one property ->"(Name)" under design category is getting displayed . Design category has 2 properties :(Name) & Locked I am able to hide "Locked" property but not "(Name)" property.By hiding Name property it doesnt work. CAn anyone suggest the solution...

    J E 2 Replies Last reply
    0
    • T Tanuja123

      I am creating custom control.I am hiding all base class properties and displaying only custom properties.But one property ->"(Name)" under design category is getting displayed . Design category has 2 properties :(Name) & Locked I am able to hide "Locked" property but not "(Name)" property.By hiding Name property it doesnt work. CAn anyone suggest the solution...

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      How are you attempting to hide Name? By deriving from the type and hiding it from there? If you use the new keyword and create a Name property with that keyword on your derived type, then make that property non-public, it should be hidden.

      Tech, life, family, faith: Give me a visit. I'm currently blogging about: Guess who's having a birthday? (It's not Jesus) The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

      1 Reply Last reply
      0
      • T Tanuja123

        I am creating custom control.I am hiding all base class properties and displaying only custom properties.But one property ->"(Name)" under design category is getting displayed . Design category has 2 properties :(Name) & Locked I am able to hide "Locked" property but not "(Name)" property.By hiding Name property it doesnt work. CAn anyone suggest the solution...

        E Offline
        E Offline
        Ed Poore
        wrote on last edited by
        #3

        snoby wrote:

        CAn anyone suggest the solution...

        Yes, you can't, (Name) refers to the name which the variable is declared in code with. E.g. if you have a textbox called txtUsername then if you look in the code generated by the designer you get:

        private System.Windows.Forms.TextBox txtUsername;

        So you can't get rid of the (Name) property because if defines how the code is generated.


        I have no idea what I just said. But my intentions were sincere.

        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