Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Browse by Tags · View All
BRH 48
#DOTNET 34
#ASP.NET 29
jQuery 22
ASP.NET 20
.NET 20
WPF 9
jquery interview questions 9
jquery faq 8
ASP.NET4 8

Archive · View All
February 2011 10
September 2011 4
August 2011 4
July 2011 4
May 2011 4
April 2011 4
March 2011 4
October 2011 4
June 2011 4
January 2011 4

What are Types of events in WPF or What is Event Routing or a Routed Event?

Sep 15 2011 2:19AM by Hima   

Event Routing or A Routed Event is a type of event that is has the ability to invoke handlers not only on on the object that raised the event but also on multiple listeners in an element tree. 

There are 2 types of events in WPF

1. Bubbling

2. Tunneling

3. Direct

Event Bubbling

It starts from Target and then bubbles up to the root  . Imagine that we have  Stack Panel inside Window , a rectangle control  inside the StackPanel.   If you we fire a bubbled event on a  rectangle ,  it will be first fired on the rectangle , then  StackPanel  and then on window .

  • Most routed events use the bubbling routing .
  • Bubbling routed events are  used to report input changes from  other UI elements.
  • All Main events Bubble.

ex: MouseDown

Event Tunneling

The order of events firing for the controls  in Event Tunneling is exactly opposite to the event Bubbling.  Do not get confused of the concept.  Let me make it very simple and clear. Imagine that we have  Stack Panel inside Window , a rectangle control  inside the StackPanel.   If you we fire  a tunneled event on a Window ,  it will be first fired on the Window, then  StackPanel  and then on rectangle .

  •   All the Preview events tunnels down

ex: PreviewMouseDown

Direct Routing
This is similar to the "routing" that Windows Forms uses for events .These are also called  CLR events which we all are used to in .NET environment. Only that event fires.

ex: Mouse Enter

Advantages in RealTime

Routed events support a class handling mechanism in which the class  specifies static methods that  handles routed events before  registered instance handlers can access them. This is  concept is  useful in control design as custom class can enforce event-driven class behaviors .

In the next post I will discuss practical implementation and how to use event routing in real time applications

Happy Beyondrelationaling!!!

Tags: .NET, #DOTNET, #ASP.NET, ASP.NET, WPF, Types of events, Event Routing,


Hima
31 · 6% · 1776
4
 
0
Lifesaver
 
0
Refreshed
 
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

"What are Types of events in WPF or What is Event Routing or a Routed Event?" rated 5 out of 5 by 4 readers
What are Types of events in WPF or What is Event Routing or a Routed Event? , 5.0 out of 5 based on 4 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]