SlideShare a Scribd company logo
Lesson 02 Introduction to XAML
 XAML stands for ExtensibleApplication
Markup Language.
 Its a simple language based on XML
 XAML code is short and clear to read
 Separation of designer code and logic
 Supported by powerful graphical design tools
like Expression Blend
Lesson 02 Introduction to XAML
Lesson 02 Introduction to XAML
Lesson 02 Introduction to XAML
 Markup extensions are dynamic placeholders
for attribute values in XAML.
 They resolve the value of a property at
runtime
 Built-in markup extensions
 Binding
▪ To bind the values of two properties together.
 StaticResource
▪ One time lookup of a resource entry
 DynamicResource
▪ Auto updating lookup of a resource entry
 TemplateBinding
▪ To bind a property of a control template to a dependency property
of the control
 x:Static
▪ Resolve the value of a static property.
 x:Null
▪ Return null
Lesson 02 Introduction to XAML
 XAML
 <Button x:Name="btnButton" Grid.Row="1"
Content="Click Me!" Click="Button_Click"/>
 Code
 btnButton.Click += Button_Click;

More Related Content

PDF
Advanced O/R Mapping with Glorp
PDF
Ruby loves DDD
PDF
The CQRS diet
PPTX
XAML and WPF - Dinko Jakovljević
PPTX
Wpf-Xaml And Layout Basics
PPTX
Exploring Adobe Flex
PDF
Designing XAML apps using Blend for Visual Studio 2013
PPT
chap04.ppt
Advanced O/R Mapping with Glorp
Ruby loves DDD
The CQRS diet
XAML and WPF - Dinko Jakovljević
Wpf-Xaml And Layout Basics
Exploring Adobe Flex
Designing XAML apps using Blend for Visual Studio 2013
chap04.ppt

Similar to Lesson 02 Introduction to XAML (10)

PDF
Silverlight 4
KEY
Migrating fx3tofx4
PDF
Silverlight 2 For Developers
PDF
React JS and Redux
PPT
Catching up on Rich Clients Part 1 of 2
PPTX
02 wp7 building silverlight applications
PDF
Introductontoxaml
PPT
Flex 4 Overview
PPTX
React js
PDF
Flex MXML Programming
Silverlight 4
Migrating fx3tofx4
Silverlight 2 For Developers
React JS and Redux
Catching up on Rich Clients Part 1 of 2
02 wp7 building silverlight applications
Introductontoxaml
Flex 4 Overview
React js
Flex MXML Programming
Ad

More from Quang Nguyễn Bá (20)

PPTX
Lesson 09 Resources and Settings in WPF
PPTX
Lesson 08 Documents and Printings in WPF
PPTX
Lesson 07 Actions and Commands in WPF
PPTX
Lesson 06 Styles and Templates in WPF
PPTX
Lesson 05 Data Binding in WPF
PPTX
Lesson 04 WPF Controls
PPTX
Lesson 03 Layouts in WPF
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
Lesson 09 Resources and Settings in WPF
Lesson 08 Documents and Printings in WPF
Lesson 07 Actions and Commands in WPF
Lesson 06 Styles and Templates in WPF
Lesson 05 Data Binding in WPF
Lesson 04 WPF Controls
Lesson 03 Layouts in WPF
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
Ad

Recently uploaded (20)

PPTX
history of c programming in notes for students .pptx
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
L1 - Introduction to python Backend.pptx
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Nekopoi APK 2025 free lastest update
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Reimagine Home Health with the Power of Agentic AI​
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
history of c programming in notes for students .pptx
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
L1 - Introduction to python Backend.pptx
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Nekopoi APK 2025 free lastest update
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Design an Analysis of Algorithms I-SECS-1021-03
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Reimagine Home Health with the Power of Agentic AI​
CHAPTER 2 - PM Management and IT Context
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
How to Choose the Right IT Partner for Your Business in Malaysia
How Creative Agencies Leverage Project Management Software.pdf
Odoo Companies in India – Driving Business Transformation.pdf
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Design an Analysis of Algorithms II-SECS-1021-03
Which alternative to Crystal Reports is best for small or large businesses.pdf
How to Migrate SBCGlobal Email to Yahoo Easily
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf

Lesson 02 Introduction to XAML

  • 2.  XAML stands for ExtensibleApplication Markup Language.  Its a simple language based on XML
  • 3.  XAML code is short and clear to read  Separation of designer code and logic  Supported by powerful graphical design tools like Expression Blend
  • 7.  Markup extensions are dynamic placeholders for attribute values in XAML.  They resolve the value of a property at runtime  Built-in markup extensions
  • 8.  Binding ▪ To bind the values of two properties together.  StaticResource ▪ One time lookup of a resource entry  DynamicResource ▪ Auto updating lookup of a resource entry  TemplateBinding ▪ To bind a property of a control template to a dependency property of the control  x:Static ▪ Resolve the value of a static property.  x:Null ▪ Return null
  • 10.  XAML  <Button x:Name="btnButton" Grid.Row="1" Content="Click Me!" Click="Button_Click"/>  Code  btnButton.Click += Button_Click;

Editor's Notes

  • #3: All you can do in XAML can also be done in code. XAML is just another way to create and initialize objects
  • #6: Properties are normally written inline as known from XML <Button Content="OK" />. But what if we want to put a more complex object as content like an image that has properties itself or maybe a whole grid panel? To do that we can use the property element syntax. This allows us to extract the property as an own child element.
  • #7: When you declare a BorderBrush, the word "Blue" is only a string. The implicit BrushConverter makes a System.Windows.Media.Brushes.Blue out of it. The same regards to the border thickness that is beeing converted implicit into a Thickness object. WPF includes a lot of type converters for built-in classes, but you can also write type converters for your own classses.
  • #8: Example: Background="{StaticResource NormalBackgroundBrush}"
  • #10: At the beginning of every XAML file you need to include two namespaces. The first is http://schemas.microsoft.com/winfx/2006/xaml/presentation. It is mapped to all wpf controls in System.Windows.Controls. The second is http://schemas.microsoft.com/winfx/2006/xaml it is mapped to System.Windows.Markup that defines the XAML keywords. The mapping between an XML namespace and a CLR namespace is done by the Xmlns attribute at assembly level. You can also directly include a CLR namespace in XAML by using the clr-namespace: prefix.