SlideShare une entreprise Scribd logo
1  sur  7
Attached 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. Blog :  http://Msarangam.wordpress.com
Attached Property Attached property is kind of Dependency property defined in XAML. For example, Canvas. Left is an attached property defined by the Canvas type , Storyboard.TargetProperty Interesting feature about Attached property is that they are not defined in the type they are declared but you can use them in another different class hierarchy “The attached properties are intended to be used as global properties that are settable on any type of object”  - Microsoft Definition
The Main advantage of Attached property is to allow different child elements to specify unique values for a property that is actually defined in a parent element. Registering and using custom attached properties in Silverlight Attached Property can only created if the class inherit from Dependency objects.   Why we need attached properties?   Because of dynamic extension of classes without inheritance  Location of Property are stored, where there are defined, Use the property when you need and what you need it.  The attached property reports information to a service.
Code Snippet publicstaticreadonlyDependencyPropertyTabStopProperty = DependencyProperty.RegisterAttached(         "TabStop",                   //Name of the property         typeof( bool ),              //Type of the property         typeof( TabPanel ),    // Type of the provider of the registered attached property                 null );                           //Callback invoked in case the property value has changed publicstaticvoidSetMyProperty( DependencyObjectobj, stringpropertyValue ) { obj.SetValue( MyPropertyProperty, propertyValue ); }  publicstaticstringGetMyProperty( DependencyObjectobj ) { return ( string )obj.GetValue( MyPropertyProperty ); }
    The value of every attached property is stored in the class the property is being attached to.  For example if you define value for the TabStop property of a button then this value is stored internally in the button, not in the TabPanel that registered it. Canvas.Top – Define the distance for a control from the top edge of its container;Canvas.Left – Define the distance for a control from the left edge of its container;Canvas.ZIndex – Z Index of the control;Grid.Row – Define the row index for a control placed in a Grid container;Grid.Column – Define the row index for a control placed in a Grid container;ScrollViewer.HorizontalScrollBarVisibility – Define the visibility of the horizontal scrollbar;ScrollViewer.VerticalScrollBarVisibility – Define the visibility of the vertical scrollbar;ToolTipService.ToolTip – Define the tool tip associated with a control;
			Thank you

Contenu connexe

Tendances

Building AngularJS Custom Directives
Building AngularJS Custom DirectivesBuilding AngularJS Custom Directives
Building AngularJS Custom DirectivesDan Wahlin
 
Basics of angular directive (Part - 1)
Basics of angular directive (Part - 1)Basics of angular directive (Part - 1)
Basics of angular directive (Part - 1)Vijay Kani
 
Custom AngularJS Directives
Custom AngularJS DirectivesCustom AngularJS Directives
Custom AngularJS Directivesyprodev
 
BDOTNET AngularJs Directives - Uday
BDOTNET AngularJs Directives - UdayBDOTNET AngularJs Directives - Uday
BDOTNET AngularJs Directives - UdayUdaya Kumar
 
Design pattern proxy介紹 20130805
Design pattern proxy介紹 20130805Design pattern proxy介紹 20130805
Design pattern proxy介紹 20130805LearningTech
 

Tendances (7)

Building AngularJS Custom Directives
Building AngularJS Custom DirectivesBuilding AngularJS Custom Directives
Building AngularJS Custom Directives
 
Basics of angular directive (Part - 1)
Basics of angular directive (Part - 1)Basics of angular directive (Part - 1)
Basics of angular directive (Part - 1)
 
Custom AngularJS Directives
Custom AngularJS DirectivesCustom AngularJS Directives
Custom AngularJS Directives
 
Angular js
Angular jsAngular js
Angular js
 
Dev308
Dev308Dev308
Dev308
 
BDOTNET AngularJs Directives - Uday
BDOTNET AngularJs Directives - UdayBDOTNET AngularJs Directives - Uday
BDOTNET AngularJs Directives - Uday
 
Design pattern proxy介紹 20130805
Design pattern proxy介紹 20130805Design pattern proxy介紹 20130805
Design pattern proxy介紹 20130805
 

En vedette

Data validation in silverlight
Data validation in silverlightData validation in silverlight
Data validation in silverlightmsarangam
 
Silverlight command
Silverlight commandSilverlight command
Silverlight commandmsarangam
 
Mvvm pattern
Mvvm patternMvvm pattern
Mvvm patternmsarangam
 
Introduction to silverlight control 3
Introduction to silverlight control  3Introduction to silverlight control  3
Introduction to silverlight control 3msarangam
 
Dependency property
Dependency propertyDependency property
Dependency propertymsarangam
 
Application in detail
Application in detailApplication in detail
Application in detailmsarangam
 
Wcf ria services
Wcf ria servicesWcf ria services
Wcf ria servicesmsarangam
 
Routed events in silverlight
Routed events in silverlightRouted events in silverlight
Routed events in silverlightmsarangam
 
What's New in Visual Studio 2010
What's New in Visual Studio 2010What's New in Visual Studio 2010
What's New in Visual Studio 2010Adil Mughal
 
dependencies properties in siverlight 2.0
dependencies properties in siverlight 2.0dependencies properties in siverlight 2.0
dependencies properties in siverlight 2.0Remya Raghu
 
Silverlight datatemplate
Silverlight datatemplateSilverlight datatemplate
Silverlight datatemplatemsarangam
 
Silverlight control template
Silverlight control templateSilverlight control template
Silverlight control templatemsarangam
 
Resources and styles
Resources and stylesResources and styles
Resources and stylesmsarangam
 
Silverlight converters
Silverlight convertersSilverlight converters
Silverlight convertersmsarangam
 
Data binding in silverlight
Data binding in silverlightData binding in silverlight
Data binding in silverlightmsarangam
 
Introduction to silverlight
Introduction to silverlightIntroduction to silverlight
Introduction to silverlightmsarangam
 
Introduction to silverlight control 4
Introduction to silverlight control 4Introduction to silverlight control 4
Introduction to silverlight control 4msarangam
 

En vedette (20)

Data validation in silverlight
Data validation in silverlightData validation in silverlight
Data validation in silverlight
 
Silverlight command
Silverlight commandSilverlight command
Silverlight command
 
Mvvm pattern
Mvvm patternMvvm pattern
Mvvm pattern
 
Introduction to silverlight control 3
Introduction to silverlight control  3Introduction to silverlight control  3
Introduction to silverlight control 3
 
Dependency property
Dependency propertyDependency property
Dependency property
 
Application in detail
Application in detailApplication in detail
Application in detail
 
Wcf ria services
Wcf ria servicesWcf ria services
Wcf ria services
 
Routed events in silverlight
Routed events in silverlightRouted events in silverlight
Routed events in silverlight
 
What's New in Visual Studio 2010
What's New in Visual Studio 2010What's New in Visual Studio 2010
What's New in Visual Studio 2010
 
Dependency Injection
Dependency InjectionDependency Injection
Dependency Injection
 
dependencies properties in siverlight 2.0
dependencies properties in siverlight 2.0dependencies properties in siverlight 2.0
dependencies properties in siverlight 2.0
 
Silverlight datatemplate
Silverlight datatemplateSilverlight datatemplate
Silverlight datatemplate
 
Silverlight control template
Silverlight control templateSilverlight control template
Silverlight control template
 
Resources and styles
Resources and stylesResources and styles
Resources and styles
 
Silverlight converters
Silverlight convertersSilverlight converters
Silverlight converters
 
Data binding in silverlight
Data binding in silverlightData binding in silverlight
Data binding in silverlight
 
Html bridge
Html bridgeHtml bridge
Html bridge
 
Introduction to silverlight
Introduction to silverlightIntroduction to silverlight
Introduction to silverlight
 
Introduction to silverlight control 4
Introduction to silverlight control 4Introduction to silverlight control 4
Introduction to silverlight control 4
 
WPF Concepts
WPF ConceptsWPF Concepts
WPF Concepts
 

Similaire à Attached property

Property wrapper and how to use them with mvvm in swift ui i copy
Property wrapper and how to use them with mvvm in swift ui i copyProperty wrapper and how to use them with mvvm in swift ui i copy
Property wrapper and how to use them with mvvm in swift ui i copyWannitaTolaema
 
Apache Struts 2 Advance
Apache Struts 2 AdvanceApache Struts 2 Advance
Apache Struts 2 AdvanceEmprovise
 
ActionScript 3.0 Fundamentals
ActionScript 3.0 FundamentalsActionScript 3.0 Fundamentals
ActionScript 3.0 FundamentalsSaurabh Narula
 
Introduction to JSX
Introduction to JSXIntroduction to JSX
Introduction to JSXMicah Wood
 
Flex3 Deep Dive Final
Flex3 Deep Dive FinalFlex3 Deep Dive Final
Flex3 Deep Dive FinalRJ Owen
 
Diving in the Flex Data Binding Waters
Diving in the Flex Data Binding WatersDiving in the Flex Data Binding Waters
Diving in the Flex Data Binding Watersmichael.labriola
 
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] : DatastoreIMC Institute
 
Objects and classes in Visual Basic
Objects and classes in Visual BasicObjects and classes in Visual Basic
Objects and classes in Visual BasicSangeetha Sg
 
WPF - Controls & Data
WPF - Controls & DataWPF - Controls & Data
WPF - Controls & DataSharada Gururaj
 
The Magic of WPF & MVVM
The Magic of WPF & MVVMThe Magic of WPF & MVVM
The Magic of WPF & MVVMAbhishek Sur
 
Force Flutter to Rebuild or Redraw All Widgets.pptx
Force Flutter to Rebuild or Redraw All Widgets.pptxForce Flutter to Rebuild or Redraw All Widgets.pptx
Force Flutter to Rebuild or Redraw All Widgets.pptxFlutter Agency
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScriptYakov Fain
 
Introduction to Core Java Programming
Introduction to Core Java ProgrammingIntroduction to Core Java Programming
Introduction to Core Java ProgrammingRaveendra R
 
Introduction to java beans
Introduction to java beansIntroduction to java beans
Introduction to java beansHitesh Parmar
 
(An Extended) Beginners Guide to Object Orientation in PHP
(An Extended) Beginners Guide to Object Orientation in PHP(An Extended) Beginners Guide to Object Orientation in PHP
(An Extended) Beginners Guide to Object Orientation in PHPRick Ogden
 
My 70-480 HTML5 certification learning
My 70-480 HTML5 certification learningMy 70-480 HTML5 certification learning
My 70-480 HTML5 certification learningSyed Irtaza Ali
 

Similaire à Attached property (20)

Property wrapper and how to use them with mvvm in swift ui i copy
Property wrapper and how to use them with mvvm in swift ui i copyProperty wrapper and how to use them with mvvm in swift ui i copy
Property wrapper and how to use them with mvvm in swift ui i copy
 
Apache Struts 2 Advance
Apache Struts 2 AdvanceApache Struts 2 Advance
Apache Struts 2 Advance
 
ActionScript 3.0 Fundamentals
ActionScript 3.0 FundamentalsActionScript 3.0 Fundamentals
ActionScript 3.0 Fundamentals
 
Introduction to JSX
Introduction to JSXIntroduction to JSX
Introduction to JSX
 
Flex3 Deep Dive Final
Flex3 Deep Dive FinalFlex3 Deep Dive Final
Flex3 Deep Dive Final
 
Introduction to Datastore
Introduction to DatastoreIntroduction to Datastore
Introduction to Datastore
 
Diving in the Flex Data Binding Waters
Diving in the Flex Data Binding WatersDiving in the Flex Data Binding Waters
Diving in the Flex Data Binding Waters
 
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
 
Wpf from David Kossoglyad
Wpf from David KossoglyadWpf from David Kossoglyad
Wpf from David Kossoglyad
 
Objects and classes in Visual Basic
Objects and classes in Visual BasicObjects and classes in Visual Basic
Objects and classes in Visual Basic
 
WPF - Controls & Data
WPF - Controls & DataWPF - Controls & Data
WPF - Controls & Data
 
The Magic of WPF & MVVM
The Magic of WPF & MVVMThe Magic of WPF & MVVM
The Magic of WPF & MVVM
 
Force Flutter to Rebuild or Redraw All Widgets.pptx
Force Flutter to Rebuild or Redraw All Widgets.pptxForce Flutter to Rebuild or Redraw All Widgets.pptx
Force Flutter to Rebuild or Redraw All Widgets.pptx
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScript
 
Introduction to Core Java Programming
Introduction to Core Java ProgrammingIntroduction to Core Java Programming
Introduction to Core Java Programming
 
Introduction to java beans
Introduction to java beansIntroduction to java beans
Introduction to java beans
 
(An Extended) Beginners Guide to Object Orientation in PHP
(An Extended) Beginners Guide to Object Orientation in PHP(An Extended) Beginners Guide to Object Orientation in PHP
(An Extended) Beginners Guide to Object Orientation in PHP
 
Flyweight pattern
Flyweight patternFlyweight pattern
Flyweight pattern
 
Dynamic Content in QTP
Dynamic Content in QTPDynamic Content in QTP
Dynamic Content in QTP
 
My 70-480 HTML5 certification learning
My 70-480 HTML5 certification learningMy 70-480 HTML5 certification learning
My 70-480 HTML5 certification learning
 

Plus de msarangam

Silverlight as a desktop application
Silverlight as a desktop applicationSilverlight as a desktop application
Silverlight as a desktop applicationmsarangam
 
Ria services
Ria servicesRia services
Ria servicesmsarangam
 
Printing in sl
Printing in slPrinting in sl
Printing in slmsarangam
 
Navigation application in silverlight
Navigation application in silverlightNavigation application in silverlight
Navigation application in silverlightmsarangam
 
Background thread
Background threadBackground thread
Background threadmsarangam
 

Plus de msarangam (7)

File access
File accessFile access
File access
 
Silverlight as a desktop application
Silverlight as a desktop applicationSilverlight as a desktop application
Silverlight as a desktop application
 
Ria services
Ria servicesRia services
Ria services
 
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
 
Background thread
Background threadBackground thread
Background thread
 

Dernier

Microsoft BitLocker Bypass Attack Method.pdf
Microsoft BitLocker Bypass Attack Method.pdfMicrosoft BitLocker Bypass Attack Method.pdf
Microsoft BitLocker Bypass Attack Method.pdfOverkill Security
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Paige Cruz
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxjbellis
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuidePixlogix Infotech
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch TuesdayIvanti
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...panagenda
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctBrainSell Technologies
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxFIDO Alliance
 
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...SOFTTECHHUB
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewDianaGray10
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxFIDO Alliance
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...FIDO Alliance
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data SciencePaolo Missier
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxFIDO Alliance
 

Dernier (20)

Microsoft BitLocker Bypass Attack Method.pdf
Microsoft BitLocker Bypass Attack Method.pdfMicrosoft BitLocker Bypass Attack Method.pdf
Microsoft BitLocker Bypass Attack Method.pdf
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 

Attached property

  • 1. Attached 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. Blog : http://Msarangam.wordpress.com
  • 3. Attached Property Attached property is kind of Dependency property defined in XAML. For example, Canvas. Left is an attached property defined by the Canvas type , Storyboard.TargetProperty Interesting feature about Attached property is that they are not defined in the type they are declared but you can use them in another different class hierarchy “The attached properties are intended to be used as global properties that are settable on any type of object” - Microsoft Definition
  • 4. The Main advantage of Attached property is to allow different child elements to specify unique values for a property that is actually defined in a parent element. Registering and using custom attached properties in Silverlight Attached Property can only created if the class inherit from Dependency objects.   Why we need attached properties? Because of dynamic extension of classes without inheritance Location of Property are stored, where there are defined, Use the property when you need and what you need it. The attached property reports information to a service.
  • 5. Code Snippet publicstaticreadonlyDependencyPropertyTabStopProperty = DependencyProperty.RegisterAttached(         "TabStop",                   //Name of the property         typeof( bool ),              //Type of the property         typeof( TabPanel ),    // Type of the provider of the registered attached property                 null );                           //Callback invoked in case the property value has changed publicstaticvoidSetMyProperty( DependencyObjectobj, stringpropertyValue ) { obj.SetValue( MyPropertyProperty, propertyValue ); } publicstaticstringGetMyProperty( DependencyObjectobj ) { return ( string )obj.GetValue( MyPropertyProperty ); }
  • 6.     The value of every attached property is stored in the class the property is being attached to. For example if you define value for the TabStop property of a button then this value is stored internally in the button, not in the TabPanel that registered it. Canvas.Top – Define the distance for a control from the top edge of its container;Canvas.Left – Define the distance for a control from the left edge of its container;Canvas.ZIndex – Z Index of the control;Grid.Row – Define the row index for a control placed in a Grid container;Grid.Column – Define the row index for a control placed in a Grid container;ScrollViewer.HorizontalScrollBarVisibility – Define the visibility of the horizontal scrollbar;ScrollViewer.VerticalScrollBarVisibility – Define the visibility of the vertical scrollbar;ToolTipService.ToolTip – Define the tool tip associated with a control;