Answer the question
In order to leave comments, you need to log in
Why does WPF use this way of specifying event handling?
Standard solution. It is also used in android and java:
class Element
{
public event EventHandler Click;
protected void OnClick(EventArgs e)
{
Click?.Invoke(this, e);
}
}
private void Window_Deactivated(object sender, EventArgs e)
{
....
}
Answer the question
In order to leave comments, you need to log in
Read about delegates and understand what Click?.Invoke(this, e);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question