-9

What does the event "VisibleChanged" mean?

For example in this code of this line:

slidePane.VisibleChanged += new EventHandler(slidePane_VisibleChanged);
Yves Schelpe
  • 3,343
  • 4
  • 36
  • 69

3 Answers3

5

Here "VisibleChanged" is an event, "slidePane_VisibleChanged" is the event handler. You are to attach the event handler to that event. So when the event fires, the event handler will be invoked.

Johnny
  • 481
  • 4
  • 13
1

Simplifying it does this: When the visibility of the slideplane is changed, invoke the event handler slidePane_VisibleChanged.

See also a more detailed explanation of event handling on SO: https://stackoverflow.com/a/803320/103139

and on MSDN: http://msdn.microsoft.com/en-us/library/aa645739(v=vs.71).aspx

Community
  • 1
  • 1
bastijn
  • 5,841
  • 5
  • 27
  • 43
0

This is an Event Handler attachment. You are attaching an event handler to your slidePane's VisibleChanged event. You have a method named slidePane_VisibleChanged that matches the signature of your EventHandler. When your VisibleChanged event triggered your slidePane_VisibleChanged method will be executed.

Also this line can be written like this:

slidePane.VisibleChanged += slidePane_VisibleChanged;

That is the short notation of attaching an event handler. See the documentation for more details.

Selman Genç
  • 100,147
  • 13
  • 119
  • 184