TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Steven Moore
NA
8
2.4k
How Do You Hide a Standard Property at Design Time?
Mar 11 2014 5:23 AM
Hi,
I'm experienced in using VB.net and have decided to teach myself C#.
I'm getting some of the basics but I've come across something that has stumped me.
How do you hide a property in the property window and intellisense at design time?
I've come across a few sites that have suggested different methods but none seem to work correctly.
The property that I'm trying to hide in this instance is the BorderStyle property of a UserControl.
I have tried adding a BorderStyle property that is Private and it still shows, but sets the BorderStyle to none.
private new BorderStyle BorderStyle { get; set; }
I have tried setting this property so that it isn't browsable, but it still shows and sets the BorderStyle to none again.
[Browsable(false)]
private new BorderStyle BorderStyle { get; set; }
I've even tried to set it as EditorBrowsable(EditorBrowsableState.Never) but I get the same results.
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
private new BorderStyle BorderStyle { get; set; }
I want it to be as though the BorderStyle property doesn't exist but the control needs to keep it's border.
Any help would be much appreciated!
Thanks
Reply
Answers (
0
)
Creating and fetching dynamic Textbox Values
Excel/Expression/Math operation on DataTable