SlideShare a Scribd company logo
1 of 9
Dependency Property 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.
Dependency Property A Dependency Property is a static method that changes the value of a instanced object property. public static readonlyDependencyPropertyIsSpinningProperty = DependencyProperty.Register("IsSpinning", typeof(Boolean),typeof(Page4), null);publicboolIsSpinning{get { return(bool)GetValue(IsSpinningProperty); }set{ SetValue(IsSpinningProperty, value); }} A property of an element that depends on a number of property-providers outside the element is called a "dependency property"
Any class inherits from System.Windows.DependencyObject can be extended with dependency properties. Support higher level features such as property value change notification, property validation, property coercion, property metadata and default property value inheritance. Dependency Property is like any other property but can hold a default value, with built in mechanism for property value validation and automatic notification for changes in property value ( for anyone listening to property value - especially UI)  and any binding in Silverlight is to binded to a Dependency Property
Microsoft Definition of DP The purpose of dependency properties is to provide a way to compute the value of a property based on the value of other inputs. These other inputs might include external properties such as user preference, just-in-time property determination mechanisms such as data binding and animations/storyboards, multiple-use templates such as resources and styles, or values known through parent-child relationships with other elements in the object tree. In addition, a dependency property can be implemented to provide callbacks that can propagate changes to other properties.
A property changed callback method is invoked ,the property changed callback should also be a static/Shared method/function, which take two parameters – DependencyObject and DependencyPropertyChangedEventArgs. The DependencyPropertyChangedEventArgs, holds three properties  NewValue OldValue Property
When to choose Dependency property We should implement your property as a dependency property whenever you want the property to support one or more of the following Silverlight property system capabilities: You want the property to be settable in a style. You want the property to be a property target that supports data binding. For more information about data binding dependency properties. You want the property to support an animated value, using the Silverlight animation system. You want the Silverlight property system to report when the previous value of the property has been changed by actions taken by the property system itself, the environment, or the user, or by reading and using styles. Your property can specify a callback method that will be invoked each time the property system determines that your property value was definitively changed
Demo
			Thank you

More Related Content

Similar to Dependency property

Attached property
Attached propertyAttached property
Attached property
msarangam
 
WPF - Controls & Data
WPF - Controls & DataWPF - Controls & Data
WPF - Controls & Data
Sharada Gururaj
 
Data binding in silverlight
Data binding in silverlightData binding in silverlight
Data binding in silverlight
msarangam
 
Project_Goibibo information technology automation testing.pptx
Project_Goibibo information technology automation testing.pptxProject_Goibibo information technology automation testing.pptx
Project_Goibibo information technology automation testing.pptx
skhushi9980
 

Similar to Dependency property (20)

Attached property
Attached propertyAttached property
Attached property
 
WPF - Controls & Data
WPF - Controls & DataWPF - Controls & Data
WPF - Controls & Data
 
Props concepts in React JS Course for beginners .docx
Props concepts in React JS Course for beginners .docxProps concepts in React JS Course for beginners .docx
Props concepts in React JS Course for beginners .docx
 
What are Props Concept in React JS Course
What are Props Concept in React JS CourseWhat are Props Concept in React JS Course
What are Props Concept in React JS Course
 
Hypermedia System Architecture for a Web of Things
Hypermedia System Architecture for a Web of ThingsHypermedia System Architecture for a Web of Things
Hypermedia System Architecture for a Web of Things
 
Data binding in silverlight
Data binding in silverlightData binding in silverlight
Data binding in silverlight
 
Introduction to Datastore
Introduction to DatastoreIntroduction to Datastore
Introduction to Datastore
 
Lightning Component - Components, Actions and Events
Lightning Component - Components, Actions and EventsLightning Component - Components, Actions and Events
Lightning Component - Components, Actions and Events
 
Test Automation Framework Development Introduction
Test Automation Framework Development IntroductionTest Automation Framework Development Introduction
Test Automation Framework Development Introduction
 
Integrating GWT, Spring and Hibernate ORM
Integrating GWT, Spring and Hibernate ORMIntegrating GWT, Spring and Hibernate ORM
Integrating GWT, Spring and Hibernate ORM
 
JAX-RS. Developing RESTful APIs with Java
JAX-RS. Developing RESTful APIs with JavaJAX-RS. Developing RESTful APIs with Java
JAX-RS. Developing RESTful APIs with Java
 
Data Binding in Silverlight
Data Binding in SilverlightData Binding in Silverlight
Data Binding in Silverlight
 
Java Web Programming on Google Cloud Platform [2/3] : Datastore
Java Web Programming on Google Cloud Platform [2/3] : DatastoreJava Web Programming on Google Cloud Platform [2/3] : Datastore
Java Web Programming on Google Cloud Platform [2/3] : Datastore
 
Oracle application-development-framework-best-practices
Oracle application-development-framework-best-practicesOracle application-development-framework-best-practices
Oracle application-development-framework-best-practices
 
Entity framework and how to use it
Entity framework and how to use itEntity framework and how to use it
Entity framework and how to use it
 
Introduction to the SharePoint Client Object Model and REST API
Introduction to the SharePoint Client Object Model and REST APIIntroduction to the SharePoint Client Object Model and REST API
Introduction to the SharePoint Client Object Model and REST API
 
J2EE pattern 5
J2EE pattern 5J2EE pattern 5
J2EE pattern 5
 
Project_Goibibo information technology automation testing.pptx
Project_Goibibo information technology automation testing.pptxProject_Goibibo information technology automation testing.pptx
Project_Goibibo information technology automation testing.pptx
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Progressive EPiServer Development
Progressive EPiServer DevelopmentProgressive EPiServer Development
Progressive EPiServer Development
 

More from msarangam

Silverlight datatemplate
Silverlight datatemplateSilverlight datatemplate
Silverlight datatemplate
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
 
Routed events in silverlight
Routed events in silverlightRouted events in silverlight
Routed events in silverlight
msarangam
 
Ria services
Ria servicesRia services
Ria services
msarangam
 
Resources and styles
Resources and stylesResources and styles
Resources and styles
msarangam
 
Printing in sl
Printing in slPrinting in sl
Printing in sl
msarangam
 
Navigation application in silverlight
Navigation application in silverlightNavigation application in silverlight
Navigation application 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
 
Data validation in silverlight
Data validation in silverlightData validation in silverlight
Data validation in silverlight
msarangam
 
Background thread
Background threadBackground thread
Background thread
msarangam
 
Application in detail
Application in detailApplication in detail
Application in detail
msarangam
 

More from msarangam (20)

File access
File accessFile access
File access
 
Silverlight datatemplate
Silverlight datatemplateSilverlight datatemplate
Silverlight datatemplate
 
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
 
Routed events in silverlight
Routed events in silverlightRouted events in silverlight
Routed events in silverlight
 
Ria services
Ria servicesRia services
Ria services
 
Resources and styles
Resources and stylesResources and styles
Resources and styles
 
File access
File accessFile access
File access
 
Printing in sl
Printing in slPrinting in sl
Printing in sl
 
Navigation application in silverlight
Navigation application in silverlightNavigation application in silverlight
Navigation application 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
 
Html bridge
Html bridgeHtml bridge
Html bridge
 
Data validation in silverlight
Data validation in silverlightData validation in silverlight
Data validation in silverlight
 
Background thread
Background threadBackground thread
Background thread
 
Application in detail
Application in detailApplication in detail
Application in detail
 

Recently uploaded

Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan CytotecJual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
ZurliaSoop
 

Recently uploaded (20)

Lucknow Housewife Escorts by Sexy Bhabhi Service 8250092165
Lucknow Housewife Escorts  by Sexy Bhabhi Service 8250092165Lucknow Housewife Escorts  by Sexy Bhabhi Service 8250092165
Lucknow Housewife Escorts by Sexy Bhabhi Service 8250092165
 
Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1
 
Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...
Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...
Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...
 
Bangalore Call Girl Just Call♥️ 8084732287 ♥️Top Class Call Girl Service Avai...
Bangalore Call Girl Just Call♥️ 8084732287 ♥️Top Class Call Girl Service Avai...Bangalore Call Girl Just Call♥️ 8084732287 ♥️Top Class Call Girl Service Avai...
Bangalore Call Girl Just Call♥️ 8084732287 ♥️Top Class Call Girl Service Avai...
 
UAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur Dubai
UAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur DubaiUAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur Dubai
UAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur Dubai
 
Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...
Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...
Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...
 
Pre Engineered Building Manufacturers Hyderabad.pptx
Pre Engineered  Building Manufacturers Hyderabad.pptxPre Engineered  Building Manufacturers Hyderabad.pptx
Pre Engineered Building Manufacturers Hyderabad.pptx
 
WheelTug Short Pitch Deck 2024 | Byond Insights
WheelTug Short Pitch Deck 2024 | Byond InsightsWheelTug Short Pitch Deck 2024 | Byond Insights
WheelTug Short Pitch Deck 2024 | Byond Insights
 
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan CytotecJual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
 
Puri CALL GIRL ❤️8084732287❤️ CALL GIRLS IN ESCORT SERVICE WE ARW PROVIDING
Puri CALL GIRL ❤️8084732287❤️ CALL GIRLS IN ESCORT SERVICE WE ARW PROVIDINGPuri CALL GIRL ❤️8084732287❤️ CALL GIRLS IN ESCORT SERVICE WE ARW PROVIDING
Puri CALL GIRL ❤️8084732287❤️ CALL GIRLS IN ESCORT SERVICE WE ARW PROVIDING
 
Cuttack Call Girl Just Call 8084732287 Top Class Call Girl Service Available
Cuttack Call Girl Just Call 8084732287 Top Class Call Girl Service AvailableCuttack Call Girl Just Call 8084732287 Top Class Call Girl Service Available
Cuttack Call Girl Just Call 8084732287 Top Class Call Girl Service Available
 
KALYANI 💋 Call Girl 9827461493 Call Girls in Escort service book now
KALYANI 💋 Call Girl 9827461493 Call Girls in  Escort service book nowKALYANI 💋 Call Girl 9827461493 Call Girls in  Escort service book now
KALYANI 💋 Call Girl 9827461493 Call Girls in Escort service book now
 
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
 
Durg CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN durg ESCORTS
Durg CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN durg ESCORTSDurg CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN durg ESCORTS
Durg CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN durg ESCORTS
 
Falcon Invoice Discounting: Unlock Your Business Potential
Falcon Invoice Discounting: Unlock Your Business PotentialFalcon Invoice Discounting: Unlock Your Business Potential
Falcon Invoice Discounting: Unlock Your Business Potential
 
KOTA 💋 Call Girl 9827461493 Call Girls in Escort service book now
KOTA 💋 Call Girl 9827461493 Call Girls in  Escort service book nowKOTA 💋 Call Girl 9827461493 Call Girls in  Escort service book now
KOTA 💋 Call Girl 9827461493 Call Girls in Escort service book now
 
Putting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptxPutting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptx
 
Nanded Call Girl Just Call 8084732287 Top Class Call Girl Service Available
Nanded Call Girl Just Call 8084732287 Top Class Call Girl Service AvailableNanded Call Girl Just Call 8084732287 Top Class Call Girl Service Available
Nanded Call Girl Just Call 8084732287 Top Class Call Girl Service Available
 
PARK STREET 💋 Call Girl 9827461493 Call Girls in Escort service book now
PARK STREET 💋 Call Girl 9827461493 Call Girls in  Escort service book nowPARK STREET 💋 Call Girl 9827461493 Call Girls in  Escort service book now
PARK STREET 💋 Call Girl 9827461493 Call Girls in Escort service book now
 
Getting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAI
Getting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAIGetting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAI
Getting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAI
 

Dependency property

  • 1. Dependency Property 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.
  • 3. Dependency Property A Dependency Property is a static method that changes the value of a instanced object property. public static readonlyDependencyPropertyIsSpinningProperty = DependencyProperty.Register("IsSpinning", typeof(Boolean),typeof(Page4), null);publicboolIsSpinning{get { return(bool)GetValue(IsSpinningProperty); }set{ SetValue(IsSpinningProperty, value); }} A property of an element that depends on a number of property-providers outside the element is called a "dependency property"
  • 4. Any class inherits from System.Windows.DependencyObject can be extended with dependency properties. Support higher level features such as property value change notification, property validation, property coercion, property metadata and default property value inheritance. Dependency Property is like any other property but can hold a default value, with built in mechanism for property value validation and automatic notification for changes in property value ( for anyone listening to property value - especially UI)  and any binding in Silverlight is to binded to a Dependency Property
  • 5. Microsoft Definition of DP The purpose of dependency properties is to provide a way to compute the value of a property based on the value of other inputs. These other inputs might include external properties such as user preference, just-in-time property determination mechanisms such as data binding and animations/storyboards, multiple-use templates such as resources and styles, or values known through parent-child relationships with other elements in the object tree. In addition, a dependency property can be implemented to provide callbacks that can propagate changes to other properties.
  • 6. A property changed callback method is invoked ,the property changed callback should also be a static/Shared method/function, which take two parameters – DependencyObject and DependencyPropertyChangedEventArgs. The DependencyPropertyChangedEventArgs, holds three properties NewValue OldValue Property
  • 7. When to choose Dependency property We should implement your property as a dependency property whenever you want the property to support one or more of the following Silverlight property system capabilities: You want the property to be settable in a style. You want the property to be a property target that supports data binding. For more information about data binding dependency properties. You want the property to support an animated value, using the Silverlight animation system. You want the Silverlight property system to report when the previous value of the property has been changed by actions taken by the property system itself, the environment, or the user, or by reading and using styles. Your property can specify a callback method that will be invoked each time the property system determines that your property value was definitively changed