SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Control Template in Silverlight Mahender Senior Software Engineer United Health Group
Mahender Sarangam Having close to 5 years of experience. Working as a Senior Software Engineer in United Health Group. Good Knowledge on C#, ASP.NET, Silverlight, WPF ,SQL Server, Team Foundation Server(TFS) and SharePoint Technology. MCTS Certified in Web Applications.
Control Template A Control Template specifies the visual structure and visual behavior of a control. Customize the look and feel of a control by giving it a new Control Template When you create a Control Template, you replace the appearance of an existing control without changing its functionality. A Control Template must have only one root element that derives from Framework Element
Control templates: All Silverlight controls are look less, which means they have hardwired functionality, but their appearance is defined separately through the control template.  Replace the default template with something new, and you can revamp basic controls such as buttons, check    boxes, radio buttons, and even windows.           Before 				After
Content Presenter When you define a Control Template, you must tell Silverlight where to place that Content. To help you do this task, Silverlight provides two Framework Element instances: Content Presenter and Items Presenter. If we are template content controls like button, label etc, we have to use content Presenter to show content
Item Presenter Item Presenter is the placeholder to show the each item in item panel ,it is similar to content presenter. But Item Presenter are used for control like Item Control . For example , we use item presenter for control like list box ,Data grid etc. For Scroll viewer, since the item has to move , we use ScrollContentPresenter for showing contents in Scrollviewer.
Control Templates and Data templates Differences Data Template is used to create a visualization of a non-visual object, such as a business object.  Control Template supplies a visual representation of a UI control, such as a Button or List View. A Data Template, therefore, is used to provide visual structure for underlying data, while a Control Template has nothing to do with underlying data and simply provides visual layout for the control itself. A Control Template will generally only contain Template Binding expressions, binding back to the properties on the control itself, while a Data Template will contain standard Binding expressions, binding to the properties of its Data Context
DEMO
Thank you!

Weitere ähnliche Inhalte

Was ist angesagt?

ActiveModeler Avantage Overview E
ActiveModeler Avantage Overview EActiveModeler Avantage Overview E
ActiveModeler Avantage Overview EGeoffrey Long
 
Lightning Component - Components, Actions and Events
Lightning Component - Components, Actions and EventsLightning Component - Components, Actions and Events
Lightning Component - Components, Actions and EventsDurgesh Dhoot
 
SP2013 for Developers - Chris O'Brien
SP2013 for Developers - Chris O'BrienSP2013 for Developers - Chris O'Brien
SP2013 for Developers - Chris O'BrienChris O'Brien
 
Rits Brown Bag - Salesforce Lightning
Rits Brown Bag - Salesforce LightningRits Brown Bag - Salesforce Lightning
Rits Brown Bag - Salesforce LightningRight IT Services
 
Mastering the Lightning Framework - Part 2
Mastering the Lightning Framework - Part 2Mastering the Lightning Framework - Part 2
Mastering the Lightning Framework - Part 2Salesforce Developers
 
Kolkata Salesforce Developer Group Online - Summer '17
Kolkata Salesforce Developer Group Online - Summer '17Kolkata Salesforce Developer Group Online - Summer '17
Kolkata Salesforce Developer Group Online - Summer '17Ashwani Soni
 
Team Site Portfolio
Team Site PortfolioTeam Site Portfolio
Team Site Portfolioskmeyer2010
 
Maintain data in custom business object
Maintain data in custom business objectMaintain data in custom business object
Maintain data in custom business objectGhassen B
 
How to embed reporting into your asp.net core web applications
How to embed reporting into your asp.net core web applications How to embed reporting into your asp.net core web applications
How to embed reporting into your asp.net core web applications Concetto Labs
 
Point and Click App Building Workshop
Point and Click App Building WorkshopPoint and Click App Building Workshop
Point and Click App Building WorkshopSalesforce Developers
 
sf tools from community
sf tools from communitysf tools from community
sf tools from communityDurgesh Dhoot
 
Automatic documentation with mule
Automatic documentation with muleAutomatic documentation with mule
Automatic documentation with muleF K
 

Was ist angesagt? (16)

ActiveModeler Avantage Overview E
ActiveModeler Avantage Overview EActiveModeler Avantage Overview E
ActiveModeler Avantage Overview E
 
Lightning Component - Components, Actions and Events
Lightning Component - Components, Actions and EventsLightning Component - Components, Actions and Events
Lightning Component - Components, Actions and Events
 
SP2013 for Developers - Chris O'Brien
SP2013 for Developers - Chris O'BrienSP2013 for Developers - Chris O'Brien
SP2013 for Developers - Chris O'Brien
 
Rits Brown Bag - Salesforce Lightning
Rits Brown Bag - Salesforce LightningRits Brown Bag - Salesforce Lightning
Rits Brown Bag - Salesforce Lightning
 
Mastering the Lightning Framework - Part 2
Mastering the Lightning Framework - Part 2Mastering the Lightning Framework - Part 2
Mastering the Lightning Framework - Part 2
 
Kolkata Salesforce Developer Group Online - Summer '17
Kolkata Salesforce Developer Group Online - Summer '17Kolkata Salesforce Developer Group Online - Summer '17
Kolkata Salesforce Developer Group Online - Summer '17
 
Lightning Components Workshop
Lightning Components WorkshopLightning Components Workshop
Lightning Components Workshop
 
Mule with facebook
Mule with facebookMule with facebook
Mule with facebook
 
How to tdd your mvp
How to tdd your mvpHow to tdd your mvp
How to tdd your mvp
 
Team Site Portfolio
Team Site PortfolioTeam Site Portfolio
Team Site Portfolio
 
Maintain data in custom business object
Maintain data in custom business objectMaintain data in custom business object
Maintain data in custom business object
 
How to embed reporting into your asp.net core web applications
How to embed reporting into your asp.net core web applications How to embed reporting into your asp.net core web applications
How to embed reporting into your asp.net core web applications
 
Point and Click App Building Workshop
Point and Click App Building WorkshopPoint and Click App Building Workshop
Point and Click App Building Workshop
 
sf tools from community
sf tools from communitysf tools from community
sf tools from community
 
What is MVC?
What is MVC?What is MVC?
What is MVC?
 
Automatic documentation with mule
Automatic documentation with muleAutomatic documentation with mule
Automatic documentation with mule
 

Andere mochten auch

Data binding in silverlight
Data binding in silverlightData binding in silverlight
Data binding in silverlightmsarangam
 
Silverlight converters
Silverlight convertersSilverlight converters
Silverlight convertersmsarangam
 
Introduction to silverlight
Introduction to silverlightIntroduction to silverlight
Introduction to silverlightmsarangam
 
Resources and styles
Resources and stylesResources and styles
Resources and stylesmsarangam
 
Introduction to silverlight control 4
Introduction to silverlight control 4Introduction to silverlight control 4
Introduction to silverlight control 4msarangam
 
Silverlight datatemplate
Silverlight datatemplateSilverlight datatemplate
Silverlight datatemplatemsarangam
 

Andere mochten auch (7)

Data binding in silverlight
Data binding in silverlightData binding in silverlight
Data binding in silverlight
 
Html bridge
Html bridgeHtml bridge
Html bridge
 
Silverlight converters
Silverlight convertersSilverlight converters
Silverlight converters
 
Introduction to silverlight
Introduction to silverlightIntroduction to silverlight
Introduction to silverlight
 
Resources and styles
Resources and stylesResources and styles
Resources and styles
 
Introduction to silverlight control 4
Introduction to silverlight control 4Introduction to silverlight control 4
Introduction to silverlight control 4
 
Silverlight datatemplate
Silverlight datatemplateSilverlight datatemplate
Silverlight datatemplate
 

Ähnlich wie Silverlight control template

AspMVC4 start101
AspMVC4 start101AspMVC4 start101
AspMVC4 start101Rich Helton
 
Lesson 06 Styles and Templates in WPF
Lesson 06 Styles and Templates in WPFLesson 06 Styles and Templates in WPF
Lesson 06 Styles and Templates in WPFQuang Nguyễn Bá
 
Code Camp 06 Model View Presenter Architecture
Code Camp 06   Model View Presenter ArchitectureCode Camp 06   Model View Presenter Architecture
Code Camp 06 Model View Presenter Architecturebitburner93
 
WP7 HUB_Introducción a Silverlight
WP7 HUB_Introducción a SilverlightWP7 HUB_Introducción a Silverlight
WP7 HUB_Introducción a SilverlightMICTT Palma
 
Get rid of controllers in angular 1.5.x start using component directives
Get rid of controllers in angular 1.5.x start using component directivesGet rid of controllers in angular 1.5.x start using component directives
Get rid of controllers in angular 1.5.x start using component directivesMarios Fakiolas
 
2.business object repository
2.business object repository2.business object repository
2.business object repositoryAjay Kumar ☁
 
Branding share point 2013
Branding share point 2013Branding share point 2013
Branding share point 2013Khoa Quach
 
Grasping The LightSwitch Paradigm
Grasping The LightSwitch ParadigmGrasping The LightSwitch Paradigm
Grasping The LightSwitch ParadigmAndrew Brust
 
Introduction To Wpf Engines
Introduction To Wpf   EnginesIntroduction To Wpf   Engines
Introduction To Wpf EnginesTamir Khason
 
George McGeachie's Favourite PowerDesigner features
George McGeachie's Favourite PowerDesigner featuresGeorge McGeachie's Favourite PowerDesigner features
George McGeachie's Favourite PowerDesigner featuresGeorge McGeachie
 

Ähnlich wie Silverlight control template (20)

AspMVC4 start101
AspMVC4 start101AspMVC4 start101
AspMVC4 start101
 
Lesson 06 Styles and Templates in WPF
Lesson 06 Styles and Templates in WPFLesson 06 Styles and Templates in WPF
Lesson 06 Styles and Templates in WPF
 
WPF Line of Business Control Templates Styles
WPF Line of Business Control Templates StylesWPF Line of Business Control Templates Styles
WPF Line of Business Control Templates Styles
 
17612235.ppt
17612235.ppt17612235.ppt
17612235.ppt
 
New Introductionfor Flash Designers
New Introductionfor Flash DesignersNew Introductionfor Flash Designers
New Introductionfor Flash Designers
 
Code Camp 06 Model View Presenter Architecture
Code Camp 06   Model View Presenter ArchitectureCode Camp 06   Model View Presenter Architecture
Code Camp 06 Model View Presenter Architecture
 
WP7 HUB_Introducción a Silverlight
WP7 HUB_Introducción a SilverlightWP7 HUB_Introducción a Silverlight
WP7 HUB_Introducción a Silverlight
 
Get rid of controllers in angular 1.5.x start using component directives
Get rid of controllers in angular 1.5.x start using component directivesGet rid of controllers in angular 1.5.x start using component directives
Get rid of controllers in angular 1.5.x start using component directives
 
INFORMATION MODELS.pptx
INFORMATION MODELS.pptxINFORMATION MODELS.pptx
INFORMATION MODELS.pptx
 
2.business object repository
2.business object repository2.business object repository
2.business object repository
 
MVC Training Part 2
MVC Training Part 2MVC Training Part 2
MVC Training Part 2
 
Branding share point 2013
Branding share point 2013Branding share point 2013
Branding share point 2013
 
Grasping The LightSwitch Paradigm
Grasping The LightSwitch ParadigmGrasping The LightSwitch Paradigm
Grasping The LightSwitch Paradigm
 
Views
ViewsViews
Views
 
Introduction To Wpf Engines
Introduction To Wpf   EnginesIntroduction To Wpf   Engines
Introduction To Wpf Engines
 
Mvc summary
Mvc summaryMvc summary
Mvc summary
 
Angular Components.pptx
Angular Components.pptxAngular Components.pptx
Angular Components.pptx
 
George McGeachie's Favourite PowerDesigner features
George McGeachie's Favourite PowerDesigner featuresGeorge McGeachie's Favourite PowerDesigner features
George McGeachie's Favourite PowerDesigner features
 
Ui 5
Ui   5Ui   5
Ui 5
 
Ellicit forms and_reports
Ellicit forms and_reportsEllicit forms and_reports
Ellicit forms and_reports
 

Mehr von msarangam

Silverlight command
Silverlight commandSilverlight command
Silverlight commandmsarangam
 
Silverlight as a desktop application
Silverlight as a desktop applicationSilverlight as a desktop application
Silverlight as a desktop applicationmsarangam
 
Routed events in silverlight
Routed events in silverlightRouted events in silverlight
Routed events in silverlightmsarangam
 
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
 
Data binding in silverlight
Data binding in silverlightData binding in silverlight
Data binding in silverlightmsarangam
 
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
 
Data validation in silverlight
Data validation in silverlightData validation in silverlight
Data validation in silverlightmsarangam
 
Background thread
Background threadBackground thread
Background threadmsarangam
 
Attached property
Attached propertyAttached property
Attached propertymsarangam
 
Application in detail
Application in detailApplication in detail
Application in detailmsarangam
 
Wcf ria services
Wcf ria servicesWcf ria services
Wcf ria servicesmsarangam
 

Mehr von msarangam (17)

File access
File accessFile access
File access
 
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
 
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
 
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 control 3
Introduction to silverlight control  3Introduction to silverlight control  3
Introduction to silverlight control 3
 
Dependency property
Dependency propertyDependency property
Dependency property
 
Data validation in silverlight
Data validation in silverlightData validation in silverlight
Data validation in silverlight
 
Background thread
Background threadBackground thread
Background thread
 
Attached property
Attached propertyAttached property
Attached property
 
Application in detail
Application in detailApplication in detail
Application in detail
 
Wcf ria services
Wcf ria servicesWcf ria services
Wcf ria services
 

Kürzlich hochgeladen

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Kürzlich hochgeladen (20)

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 

Silverlight control template

  • 1. Control Template in Silverlight Mahender Senior Software Engineer United Health Group
  • 2. Mahender Sarangam Having close to 5 years of experience. Working as a Senior Software Engineer in United Health Group. Good Knowledge on C#, ASP.NET, Silverlight, WPF ,SQL Server, Team Foundation Server(TFS) and SharePoint Technology. MCTS Certified in Web Applications.
  • 3. Control Template A Control Template specifies the visual structure and visual behavior of a control. Customize the look and feel of a control by giving it a new Control Template When you create a Control Template, you replace the appearance of an existing control without changing its functionality. A Control Template must have only one root element that derives from Framework Element
  • 4. Control templates: All Silverlight controls are look less, which means they have hardwired functionality, but their appearance is defined separately through the control template. Replace the default template with something new, and you can revamp basic controls such as buttons, check boxes, radio buttons, and even windows. Before After
  • 5. Content Presenter When you define a Control Template, you must tell Silverlight where to place that Content. To help you do this task, Silverlight provides two Framework Element instances: Content Presenter and Items Presenter. If we are template content controls like button, label etc, we have to use content Presenter to show content
  • 6. Item Presenter Item Presenter is the placeholder to show the each item in item panel ,it is similar to content presenter. But Item Presenter are used for control like Item Control . For example , we use item presenter for control like list box ,Data grid etc. For Scroll viewer, since the item has to move , we use ScrollContentPresenter for showing contents in Scrollviewer.
  • 7. Control Templates and Data templates Differences Data Template is used to create a visualization of a non-visual object, such as a business object. Control Template supplies a visual representation of a UI control, such as a Button or List View. A Data Template, therefore, is used to provide visual structure for underlying data, while a Control Template has nothing to do with underlying data and simply provides visual layout for the control itself. A Control Template will generally only contain Template Binding expressions, binding back to the properties on the control itself, while a Data Template will contain standard Binding expressions, binding to the properties of its Data Context