I want to add a custom property to a button in window form. Currently i am using following code to create my logic. but i want to create an enum value for a button control.
btnPartyDetails.Text = "View";
{}
btnPartyDetails.Text = "Add";
{}
btnPartyDetails.Text = "Delete";
{}
btnPartyDetails.Text = "Edit";
{}
I want to perform some action based on these values and i want to make a custom property for button so that i can use enum instead of using text match.
btnPartyDetails.ActionType= ActionType.View;
{}
btnPartyDetails.ActionType= ActionType.Add;
{}
btnPartyDetails.ActionType= ActionType.Delete;
{}
btnPartyDetails.ActionType= ActionType.Edit;
{}
I want to do something like this, where ActionType will be my enum
.
I also want to create custom event based on the value set. How can i do this ?