SlideShare a Scribd company logo
Lesson 09 Resources and Settings in WPF
Lesson 09 Resources and Settings in WPF
 A resource is an object that can be reused in
different places in your application.
 Resources allow you to define object for use in
you application and share object among
elements
 Any object in WPF can be a resource
 WPF use ResourceDictionary class to manage
resources and FrameworkElement base class to
work with resources
 ResourceDictionary like a Hashtable (key/object)
 System scope
 Configure at a system-wide
level
 Example: brushes, fonts, and
metrics…
 Application scope
 Used throughout your
application
 Useful for styles or control
templates
 Windows scope
 Used throughout windows
 Element scope
 Used internal the element
 Designing Settings
 Preferred settings mechanism by ApplicationSettingsBase class
from the System.Configuration namespace
 Designer support
 Two type: User/Application settings
 Using settings
 Load: Properties.Settings.Default.[Your setting]
 Save: Properties.Settings.Default.Save();
 Integrating withWPF databinding
<TextBlock
Text="{Binding
Path=MyAppSettings,
Source={x:Static local:Properties.Settings.Default}}" />
Using Settings

More Related Content

PPTX
Lesson 06 Styles and Templates in WPF
PPTX
Lesson 05 Data Binding in WPF
PPT
Dev308
PPT
SciVerse Application Integration Points
PPTX
Interface connection
PPTX
Data Binding for Xamarin Forms In-Depth
PPT
PPTX
Advance Webpage Devlopment .NET
Lesson 06 Styles and Templates in WPF
Lesson 05 Data Binding in WPF
Dev308
SciVerse Application Integration Points
Interface connection
Data Binding for Xamarin Forms In-Depth
Advance Webpage Devlopment .NET

What's hot (20)

PPTX
ASP.NET MVC Controllers & Actions
PPTX
MS Sql Server:Reporting models
PPTX
Attached property
PPTX
Ado.net
PPTX
Configuring Data Binding part2 ABTO Software Lecture Korotchyn
PPTX
Configuring Data Binding part1 ABTO Software Lecture Korotchyn
PPTX
Datasource in asp.net
PPTX
asp.net data controls
PDF
WPF DATA BINDING CHEATSHEET V1.1
PPTX
Android Training (Content Provider)
PDF
Data Binding and Data Grid View Classes
PPTX
Salesforce talk
PPTX
Binding radgridview into reportviewer
PPTX
SAP BO Web Intelligence Basics
PPTX
Android content provider explained
PPTX
Overview Of ADO .NET from Wingslive.com
PDF
Data Binding in Silverlight
PPT
Group Meeting Vamsas Project Final
ASP.NET MVC Controllers & Actions
MS Sql Server:Reporting models
Attached property
Ado.net
Configuring Data Binding part2 ABTO Software Lecture Korotchyn
Configuring Data Binding part1 ABTO Software Lecture Korotchyn
Datasource in asp.net
asp.net data controls
WPF DATA BINDING CHEATSHEET V1.1
Android Training (Content Provider)
Data Binding and Data Grid View Classes
Salesforce talk
Binding radgridview into reportviewer
SAP BO Web Intelligence Basics
Android content provider explained
Overview Of ADO .NET from Wingslive.com
Data Binding in Silverlight
Group Meeting Vamsas Project Final
Ad

Similar to Lesson 09 Resources and Settings in WPF (20)

PDF
Android resource
PPTX
Globalization and accessibility
PPTX
Azure for SharePoint Developers - Workshop - Part 3: Web Services
PPTX
Castle in the Clouds: SaaS-Enabling Oracle ADF Faces Applications
PPTX
SharePoint Connections Coast to Coast Overview of Enterprise Content Management
PPTX
Resources and styles
PDF
Mobile Application Development -Lecture 11 & 12.pdf
PPTX
Site Templates in SP 13
PPTX
Explore SharePoint 2010 Enterprise & Document Management features
PDF
Building social and RESTful frameworks
PPTX
Android styles and themes
PPTX
ECM And Enterprise Metadata in SharePoint 2010
PDF
DSpace: Technical Basics
PPTX
Cocoa and MVC in ios, iOS Training Ahmedbad , iOS classes Ahmedabad
PPT
eyeryeryeryeryeyeyeryeryyerye13872085.ppt
PPT
Synapseindia drupal intro 0
PDF
Android App Development 08 : Support Multiple Devices
PPTX
Conventions' Publications First presentation
PPTX
Introduction to Azure Resource Manager, Global Azure Bootcamp 2016.04
PPTX
data and information
Android resource
Globalization and accessibility
Azure for SharePoint Developers - Workshop - Part 3: Web Services
Castle in the Clouds: SaaS-Enabling Oracle ADF Faces Applications
SharePoint Connections Coast to Coast Overview of Enterprise Content Management
Resources and styles
Mobile Application Development -Lecture 11 & 12.pdf
Site Templates in SP 13
Explore SharePoint 2010 Enterprise & Document Management features
Building social and RESTful frameworks
Android styles and themes
ECM And Enterprise Metadata in SharePoint 2010
DSpace: Technical Basics
Cocoa and MVC in ios, iOS Training Ahmedbad , iOS classes Ahmedabad
eyeryeryeryeryeyeyeryeryyerye13872085.ppt
Synapseindia drupal intro 0
Android App Development 08 : Support Multiple Devices
Conventions' Publications First presentation
Introduction to Azure Resource Manager, Global Azure Bootcamp 2016.04
data and information
Ad

More from Quang Nguyễn Bá (19)

PPTX
Lesson 08 Documents and Printings in WPF
PPTX
Lesson 07 Actions and Commands in WPF
PPTX
Lesson 04 WPF Controls
PPTX
Lesson 03 Layouts in WPF
PPTX
Lesson 02 Introduction to XAML
PPTX
Lesson 01 Introduction to WPF
PPTX
Business intelligence
PPTX
TDD - Test Driven Dvelopment | Test First Design
PPTX
Scrum sử dụng Team Foundation Server 2012
PPTX
Introduction to Microsoft SQL Server 2008 R2 Integration Services
PPTX
Introduction to Business Intelligence in Microsoft SQL Server 2008 R2
PPTX
Introduction to Microsoft SQL Server 2008 R2 Analysis Service
PPTX
Office 2010 Programming
PPTX
Giới thiệu WCF
PPTX
MOSS 2007 Overview
PPTX
SharePoint Programming Basic
PPTX
SharePoint 2010 Business Intelligence
PPTX
Programming SharePoint 2010 with Visual Studio 2010
PPTX
SharePoint Web part programming
Lesson 08 Documents and Printings in WPF
Lesson 07 Actions and Commands in WPF
Lesson 04 WPF Controls
Lesson 03 Layouts in WPF
Lesson 02 Introduction to XAML
Lesson 01 Introduction to WPF
Business intelligence
TDD - Test Driven Dvelopment | Test First Design
Scrum sử dụng Team Foundation Server 2012
Introduction to Microsoft SQL Server 2008 R2 Integration Services
Introduction to Business Intelligence in Microsoft SQL Server 2008 R2
Introduction to Microsoft SQL Server 2008 R2 Analysis Service
Office 2010 Programming
Giới thiệu WCF
MOSS 2007 Overview
SharePoint Programming Basic
SharePoint 2010 Business Intelligence
Programming SharePoint 2010 with Visual Studio 2010
SharePoint Web part programming

Recently uploaded (20)

PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
medical staffing services at VALiNTRY
PDF
Cost to Outsource Software Development in 2025
PPTX
Reimagine Home Health with the Power of Agentic AI​
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
iTop VPN Free 5.6.0.5262 Crack latest version 2025
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Introduction to Artificial Intelligence
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PPTX
Transform Your Business with a Software ERP System
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
assetexplorer- product-overview - presentation
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
medical staffing services at VALiNTRY
Cost to Outsource Software Development in 2025
Reimagine Home Health with the Power of Agentic AI​
Computer Software and OS of computer science of grade 11.pptx
wealthsignaloriginal-com-DS-text-... (1).pdf
Designing Intelligence for the Shop Floor.pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
iTop VPN Free 5.6.0.5262 Crack latest version 2025
Design an Analysis of Algorithms I-SECS-1021-03
Which alternative to Crystal Reports is best for small or large businesses.pdf
Introduction to Artificial Intelligence
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Transform Your Business with a Software ERP System
Design an Analysis of Algorithms II-SECS-1021-03
assetexplorer- product-overview - presentation
Odoo POS Development Services by CandidRoot Solutions
Lecture 3: Operating Systems Introduction to Computer Hardware Systems

Lesson 09 Resources and Settings in WPF

  • 3.  A resource is an object that can be reused in different places in your application.  Resources allow you to define object for use in you application and share object among elements  Any object in WPF can be a resource  WPF use ResourceDictionary class to manage resources and FrameworkElement base class to work with resources  ResourceDictionary like a Hashtable (key/object)
  • 4.  System scope  Configure at a system-wide level  Example: brushes, fonts, and metrics…  Application scope  Used throughout your application  Useful for styles or control templates  Windows scope  Used throughout windows  Element scope  Used internal the element
  • 5.  Designing Settings  Preferred settings mechanism by ApplicationSettingsBase class from the System.Configuration namespace  Designer support  Two type: User/Application settings  Using settings  Load: Properties.Settings.Default.[Your setting]  Save: Properties.Settings.Default.Save();  Integrating withWPF databinding <TextBlock Text="{Binding Path=MyAppSettings, Source={x:Static local:Properties.Settings.Default}}" />

Editor's Notes

  • #4: At the heart of resource management is the ResourceDictionary class. Outwardly, this is just a simple collection class. It behaves much like an ordinary Hashtable—it allows objects to be associated with keys, and it provides an indexer that lets you retrieve those objects using these keys. So, in theory, you could use the ResourceDictionary like a Hashtable For example, the FrameworkElement base class, from which most user interface elements derive, provides a resource dictionary in its Resources property