SlideShare a Scribd company logo
1 of 7
Routed Events Mahender Senior Software Engineer United Health Group
Mahender Sarangam 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.  Got Technical Acquaintance on Technologies like C#, ASP.NET,AJAX, LINQ, Silverlight, WPF,WCF ,SQL Server, Team Foundation Server(TFS) and SharePoint Technology.  MCTS Certified in Web Technologies. Blog :  http://Msarangam.wordpress.com
What are Routed Events? Events in Silverlight are used much like events in any other .NET technology. In Silverlight, there are two general event cases: input events and non-input events 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. There are three types of RoutedEvents - direct, tunneling, and bubbling
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.
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.  In order to get the original source of the event, you need to check the OriginalSource property of the RoutedEventArgs supplied to the handler.
Disadvantages in Routed in SL There are some differences between the routed events in Silverlight and WPF. Here are the most important of them: 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.  The only type of routed events in Silverlight is the bubbling event. Such events for example are the MouseLeftButtonDown and the MouseLeftButtonUp.  The control specific events don't bubble - for example the Click event of the Button control.
			Thank you

More Related Content

Similar to Routed events in silverlight

A Review on LWC Events for communication.pptx
A Review on LWC Events for communication.pptxA Review on LWC Events for communication.pptx
A Review on LWC Events for communication.pptx
KadharBashaJ
 
Sql Injection Attacks And A Web Application Environment
Sql Injection Attacks And A Web Application EnvironmentSql Injection Attacks And A Web Application Environment
Sql Injection Attacks And A Web Application Environment
Sheri Elliott
 
LWC_Workbxcgbgfbgfbfgbfgbfbfbshop_Day2.pptx
LWC_Workbxcgbgfbgfbfgbfgbfbfbshop_Day2.pptxLWC_Workbxcgbgfbgfbfgbfgbfbfbshop_Day2.pptx
LWC_Workbxcgbgfbgfbfgbfgbfbfbshop_Day2.pptx
Vkrish Peru
 
CYREN_Q1_2015_Trend_Report
CYREN_Q1_2015_Trend_ReportCYREN_Q1_2015_Trend_Report
CYREN_Q1_2015_Trend_Report
Chris Taylor
 

Similar to Routed events in silverlight (20)

A Review on LWC Events for communication.pptx
A Review on LWC Events for communication.pptxA Review on LWC Events for communication.pptx
A Review on LWC Events for communication.pptx
 
WPF Fundamentals
WPF FundamentalsWPF Fundamentals
WPF Fundamentals
 
The Significant role of event driven apps in software development
The Significant role of event driven apps in software development					The Significant role of event driven apps in software development
The Significant role of event driven apps in software development
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura Interoperability
 
Windows presentation foundation (wpf) and infragistics
Windows presentation foundation (wpf) and infragisticsWindows presentation foundation (wpf) and infragistics
Windows presentation foundation (wpf) and infragistics
 
Html bridge
Html bridgeHtml bridge
Html bridge
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Sql Injection Attacks And A Web Application Environment
Sql Injection Attacks And A Web Application EnvironmentSql Injection Attacks And A Web Application Environment
Sql Injection Attacks And A Web Application Environment
 
Riacon swiz
Riacon swizRiacon swiz
Riacon swiz
 
Lightning Components - Down Under Dreaming Sydney
Lightning Components - Down Under Dreaming Sydney Lightning Components - Down Under Dreaming Sydney
Lightning Components - Down Under Dreaming Sydney
 
LWC_Workbxcgbgfbgfbfgbfgbfbfbshop_Day2.pptx
LWC_Workbxcgbgfbgfbfgbfgbfbfbshop_Day2.pptxLWC_Workbxcgbgfbgfbfgbfgbfbfbshop_Day2.pptx
LWC_Workbxcgbgfbgfbfgbfgbfbfbshop_Day2.pptx
 
AD104 - IBM Connections ActivityStream Integration - IBM Connect 2013
AD104 - IBM Connections ActivityStream Integration - IBM Connect 2013AD104 - IBM Connections ActivityStream Integration - IBM Connect 2013
AD104 - IBM Connections ActivityStream Integration - IBM Connect 2013
 
Guido schmutz-jax2011-event-driven soa
Guido schmutz-jax2011-event-driven soaGuido schmutz-jax2011-event-driven soa
Guido schmutz-jax2011-event-driven soa
 
Optimizing Your SOA with Event Processing
Optimizing Your SOA with Event ProcessingOptimizing Your SOA with Event Processing
Optimizing Your SOA with Event Processing
 
PATTERNS06 - The .NET Event Model
PATTERNS06 - The .NET Event ModelPATTERNS06 - The .NET Event Model
PATTERNS06 - The .NET Event Model
 
Javascript Browser Events.pdf
Javascript Browser Events.pdfJavascript Browser Events.pdf
Javascript Browser Events.pdf
 
JFS 2017 - Orchestration of microservices
JFS 2017 - Orchestration of microservicesJFS 2017 - Orchestration of microservices
JFS 2017 - Orchestration of microservices
 
Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)
 
CYREN_Q1_2015_Trend_Report
CYREN_Q1_2015_Trend_ReportCYREN_Q1_2015_Trend_Report
CYREN_Q1_2015_Trend_Report
 
Trailblazer Community - Flows Workshop (Session 1)
Trailblazer Community - Flows Workshop (Session 1)Trailblazer Community - Flows Workshop (Session 1)
Trailblazer Community - Flows Workshop (Session 1)
 

More from msarangam

Data binding in silverlight
Data binding in silverlightData binding in silverlight
Data binding in silverlight
msarangam
 
Silverlight control template
Silverlight control templateSilverlight control template
Silverlight control template
msarangam
 
Silverlight converters
Silverlight convertersSilverlight converters
Silverlight converters
msarangam
 
Silverlight command
Silverlight commandSilverlight command
Silverlight command
msarangam
 
Silverlight as a desktop application
Silverlight as a desktop applicationSilverlight as a desktop application
Silverlight as a desktop application
msarangam
 
Resources and styles
Resources and stylesResources and styles
Resources and styles
msarangam
 
Navigation application in silverlight
Navigation application in silverlightNavigation application in silverlight
Navigation application in silverlight
msarangam
 
Data binding in silverlight
Data binding in silverlightData binding in silverlight
Data binding in silverlight
msarangam
 
Mvvm pattern
Mvvm patternMvvm pattern
Mvvm pattern
msarangam
 
Introduction to silverlight
Introduction to silverlightIntroduction to silverlight
Introduction to silverlight
msarangam
 
Introduction to silverlight control 3
Introduction to silverlight control  3Introduction to silverlight control  3
Introduction to silverlight control 3
msarangam
 
Introduction to silverlight control 4
Introduction to silverlight control 4Introduction to silverlight control 4
Introduction to silverlight control 4
msarangam
 
Dependency property
Dependency propertyDependency property
Dependency property
msarangam
 
Data validation in silverlight
Data validation in silverlightData validation in silverlight
Data validation in silverlight
msarangam
 
Attached property
Attached propertyAttached property
Attached property
msarangam
 

More from msarangam (15)

Data binding in silverlight
Data binding in silverlightData binding in silverlight
Data binding in silverlight
 
Silverlight control template
Silverlight control templateSilverlight control template
Silverlight control template
 
Silverlight converters
Silverlight convertersSilverlight converters
Silverlight converters
 
Silverlight command
Silverlight commandSilverlight command
Silverlight command
 
Silverlight as a desktop application
Silverlight as a desktop applicationSilverlight as a desktop application
Silverlight as a desktop application
 
Resources and styles
Resources and stylesResources and styles
Resources and styles
 
Navigation application in silverlight
Navigation application in silverlightNavigation application in silverlight
Navigation application in silverlight
 
Data binding in silverlight
Data binding in silverlightData binding in silverlight
Data binding in silverlight
 
Mvvm pattern
Mvvm patternMvvm pattern
Mvvm pattern
 
Introduction to silverlight
Introduction to silverlightIntroduction to silverlight
Introduction to silverlight
 
Introduction to silverlight control 3
Introduction to silverlight control  3Introduction to silverlight control  3
Introduction to silverlight control 3
 
Introduction to silverlight control 4
Introduction to silverlight control 4Introduction to silverlight control 4
Introduction to silverlight control 4
 
Dependency property
Dependency propertyDependency property
Dependency property
 
Data validation in silverlight
Data validation in silverlightData validation in silverlight
Data validation in silverlight
 
Attached property
Attached propertyAttached property
Attached property
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Routed events in silverlight

  • 1. Routed Events Mahender Senior Software Engineer United Health Group
  • 2. Mahender Sarangam 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. Got Technical Acquaintance on Technologies like C#, ASP.NET,AJAX, LINQ, Silverlight, WPF,WCF ,SQL Server, Team Foundation Server(TFS) and SharePoint Technology. MCTS Certified in Web Technologies. Blog : http://Msarangam.wordpress.com
  • 3. What are Routed Events? Events in Silverlight are used much like events in any other .NET technology. In Silverlight, there are two general event cases: input events and non-input events 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. There are three types of RoutedEvents - direct, tunneling, and bubbling
  • 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.
  • 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. In order to get the original source of the event, you need to check the OriginalSource property of the RoutedEventArgs supplied to the handler.
  • 6. Disadvantages in Routed in SL There are some differences between the routed events in Silverlight and WPF. Here are the most important of them: 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. The only type of routed events in Silverlight is the bubbling event. Such events for example are the MouseLeftButtonDown and the MouseLeftButtonUp. The control specific events don't bubble - for example the Click event of the Button control.