Routed Events<br />Mahender<br />Senior Software Engineer<br />United Health Group<br />
Mahender Sarangam<br />Having 5 years of experience on .NET Technologies. Working as a Senior Software Engineer in United ...
What are Routed Events?<br />Events in Silverlight are used much like events in any other .NET technology.<br />In Silverl...
Direct - This type of routed events can be handled only by the controls that had raised them. They are very similar to the...
The main difference between routed events and standard CLR events, to the handler of the event, is that the event sender i...
Disadvantages in Routed in SL<br />There are some differences between the routed events in Silverlight and WPF. Here are t...
			Thank you<br />
Upcoming SlideShare
Loading in …5
×

Routed events in silverlight

1,772 views
1,699 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,772
On SlideShare
0
From Embeds
0
Number of Embeds
382
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Routed events in silverlight

  1. 1. Routed Events<br />Mahender<br />Senior Software Engineer<br />United Health Group<br />
  2. 2. Mahender Sarangam<br />Having 5 years of experience on .NET Technologies. Working as a Senior Software Engineer in United Health Group (UHG India Information Service Ltd.). Worked with Big Firms like Deloitte Consulting & Wipro Technology. <br />Got Technical Acquaintance on Technologies like C#, ASP.NET,AJAX, LINQ, Silverlight, WPF,WCF ,SQL Server, Team Foundation Server(TFS) and SharePoint Technology. <br />MCTS Certified in Web Technologies.<br />Blog : http://Msarangam.wordpress.com <br />
  3. 3. What are Routed Events?<br />Events in Silverlight are used much like events in any other .NET technology.<br />In Silverlight, there are two general event cases: input events and non-input events<br />For example, event routing allows a click that begins in a shape to rise up to that shape’s container and then to the containing page before it’s handled by your code.<br />There are three types of RoutedEvents - direct, tunneling, and bubbling<br />
  4. 4. Direct - This type of routed events can be handled only by the controls that had raised them. They are very similar to the events we are familiar with from WinForms and ASP.NET. Tunneling - By this type of events, first the handlers of the root element of the visual tree are invoked and then the event travels through the child elements till it reaches the one that originally has raised it. Bubbling - This type of events is first handled by their source and then the event handlers of the parent elements are invoked till the event reaches the root element of the visual tree.<br />
  5. 5. The main difference between routed events and standard CLR events, to the handler of the event, is that the event sender isn’t necessarily the original source of the event. <br />In order to get the original source of the event, you need to check the OriginalSource property of the RoutedEventArgs supplied to the handler.<br />
  6. 6. Disadvantages in Routed in SL<br />There are some differences between the routed events in Silverlight and WPF. Here are the most important of them:<br />You cannot create custom RoutedEvents in Silverlight. In WPF to create a custom event of this type we use EventManager, but in Silverlight it's not available. <br />The only type of routed events in Silverlight is the bubbling event. Such events for example are the MouseLeftButtonDown and the MouseLeftButtonUp. <br />The control specific events don't bubble - for example the Click event of the Button control. <br />
  7. 7. Thank you<br />

×