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