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
subramanya aithal
NA
8
1.4k
Simple Usercontrol using Buttons
Oct 6 2011 7:29 AM
Hi All
Greetings
I am creating a simple usercontrol which has 5 buttons in it. I am developing this just to learn how to create a usercontrol. I am 5 button during runtime to a list and simultaneously to the usercontrol. I am adding it to the list so that i can edit those buttons using property grid. the code is as follows
private List<Button> bttns = new List<Button>();
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[Editor(typeof(BlitzHeaderPanelCollectionEditor),typeof(UITypeEditor))]
public List<Button> Bttns
{
get{return bttns;}
}
int the initilisecomponent function i am adding 5 buttons programatically.
Now my issue is i am able to see those 5 buttons as collections in propertygrid
if i edit them the changes take place during design time but when i run the program the changes are wiped off to the defualt. Why is this happening. Please help me experts
Reply
Answers (
1
)
C# - TriStateCheckboxes in Treeview
Auto complete textbox