Is there a way to execute a piece of code before an event occurs?
example when we say Expanded=”OnExpand”
here the code inside OnExpand occurs after the Expanded event occurs. What if I want to execute a piece of code before that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’re talking about the Expander control, you could subclass it and override the IsExpanded property, raising your own PreviewExpanded event before calling
base.IsExpanded = value;