Events handling

While in the process of development of apps/software in any IDE, it is necessary to understand about the events and event handling. One cannot start developing in GUI until and unless he/she understands about the events and handling them. So what are events? Events are hard to be defined but it can be clearly understood by the help of example. The mouse clicking, double clicking, hovering, exiting, text changing, value changing etc are the events handlers. In such case, some tasks are performed. like what things are to be done when the mouse is clicked. In fact, one should know how to handle when such events are called. Some codes must be done in order to perform some tasks when the events are done. Like if have a button and on clicking some message must be displayed, in such case, on the click event of button I have to write a code to display the message. It is just like the function which is called with some arguments passed and within that function the codes is written. An example of event handling is somewhat like this:

private void Button_Click_1(object sender, RoutedEventArgs e)
       {
           //codes to handle the click event
       }

The thing is nothing but the function which is called when the clicking is done in the button. And all those codes inside the function gets executed.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s