SlideShare a Scribd company logo
1 of 24
WINDOWS PRESENTATION
FOUNDATION
(WPF)
By:- Debadatta Gadanayak
Better UI Statistics
 When UI improves the customer experience, it
raises a company’s KPIs up to 83% in
conversion lift.
 Research shows that, on average,
every $1 invested in UI and UX brings $100 in
return. That’s an ROI of a whopping 9,900%.
 8 in 10 customers are willing to pay more for
better customer experience.
What is WPF?
 WPF stands for Windows Presentation Foundation.
 It is a UI framework for building Windows desktop
applications.
 WPF supports a broad set of application development
features, including an application model, resources,
controls, graphics, layout, data binding and documents.
 WPF uses the Extensible Application Markup Language
(XAML) to provide a declarative model for application
programming.
History Of WPF
2000
Work began under
code name AVALON
2005
AVALON was
renamed to WPF
2006
WPF released as a part
of .Net Framework 3.0
2018
Microsoft announced
WPF as open source
project on GitHub
Resolution
Independent
Animations Data Binding
2D & 3D
Media Services
Interoperability
Templates
1
2
3
4
5
6
FEATURES
WPF Architecture
Presentation Framework
Presentation Core
CLR
Kernel
milicore
DirectX
User32
Managed
Code
Unmanaged
Code
How to Create your first WPF Application?
Step 1) Open Visual Studio And Create A New Project
How to Create your first WPF Application?
Step 2) Select WPF App(.Net Framework) and click Next
How to Create your first WPF Application?
Step 3) Assign name to your project an Click on Create
How to Create your first WPF Application?
Step 4)The Project window Opens up with code window and design window
How to Create your first WPF Application?
Step 5) From Toolbox double click on Textbox and the code will be automatically generated
How to Create your first WPF Application?
Step 6) To test your program click on the start button
How to Create your first WPF Application?
Step 7) The project will start running
What is XAML?
 It stands for eXtensible Application Markup Language.
 Simple and declarative language based on XML
 Mainly used for designing GUIs
Basic Syntax:-
<Window x:Class = "Resources.MainWindow"
xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x = "http://schemas.microsoft.com/winfx/2006/xaml"
Title = "MainWindow" Height = "350" Width = "525">
<Grid>
</Grid>
</Window>
Common WPF Controls
WPF Layouts
Stack Panel Wrap Panel
Canvas Panel Grid Panel
Dock Panel
Some of the most commonly used and popular layout panels:-
1. Stack Panel
<Window x:Class="WpfTutorial.Panels.StackPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="StackPanel"
Height="160" Width="300">
<StackPanel>
<Button>Button 1</Button>
<Button>Button 2</Button>
<Button>Button 3</Button>
<Button>Button 4</Button>
<Button>Button 5</Button>
<Button>Button 6</Button>
</StackPanel>
</Window>
<Window x:Class="WpfTutorial.Panels.StackPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="StackPanel"
Height="160" Width="300">
<StackPanel Orientation="Horizontal">
<Button>Button 1</Button>
<Button>Button 2</Button>
<Button>Button 3</Button>
<Button>Button 4</Button>
<Button>Button 5</Button>
<Button>Button 6</Button>
</StackPanel>
</Window>
2. Wrap Panel
<Window x:Class="WpfTutorialSamples.Panels.WrapPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="WrapPanel"
Height="300" Width="300">
<WrapPanel>
<Button>Test button 1</Button>
<Button>Test button 2</Button>
<Button>Test button 3</Button>
<Button Height="40">Test button 4</Button>
<Button>Test button 5</Button>
<Button>Test button 6</Button>
</WrapPanel>
</Window>
<Window x:Class="WpfTutorialSamples.Panels.WrapPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="WrapPanel"
Height="120" Width="300">
<WrapPanel Orientation="Vertical">
<Button>Test button 1</Button>
<Button>Test button 2</Button>
<Button>Test button 3</Button>
<Button Width="140">Test button 4</Button>
<Button>Test button 5</Button>
<Button>Test button 6</Button>
</WrapPanel>
</Window>
3. Dock Panel
<Window x:Class="WpfTutorialSamples.Panels.DockPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="DockPanel"
Height="250" Width="250">
<DockPanel>
<Button DockPanel.Dock="Left">Left</Button>
<Button DockPanel.Dock="Top">Top</Button>
<Button DockPanel.Dock="Right">Right</Button>
<Button DockPanel.Dock="Bottom">Bottom</Button>
<Button>Center</Button>
</DockPanel>
</Window>
4. Canvas Panel
<Window x:Class="WpfTutorialSamples.Panels.Canvas"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Canvas"
Height="200" Width="200">
<Canvas>
<Button Canvas.Left="10">Top left</Button>
<Button Canvas.Right="10">Top right</Button>
<Button Canvas.Left="10" Canvas.Bottom="10">Bottom left</Button>
<Button Canvas.Right="10" Canvas.Bottom="10">Bottom right</Button>
</Canvas>
</Window>
<Window x:Class="WpfTutorialSamples.Panels.CanvasZIndex"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="CanvasZIndex" Height="275" Width="260">
<Canvas> <Ellipse Panel.ZIndex="2" Fill="Gainsboro" Canvas.Left="25"
Canvas.Top="25" Width="200" Height="200" />
<Rectangle Panel.ZIndex="3" Fill="LightBlue" Canvas.Left="25" Canvas.Top="25"
Width="50" Height="50" />
<Rectangle Panel.ZIndex="2" Fill="LightCoral" Canvas.Left="50" Canvas.Top="50"
Width="50" Height="50" />
<Rectangle Panel.ZIndex="4" Fill="LightCyan" Canvas.Left="75" Canvas.Top="75"
Width="50" Height="50" />
</Canvas>
</Window>
5. Grid Panel
<Window x:Class="WpfTutorialSamples.Panels.TabularGrid"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="TabularGrid"
Height="300" Width="300">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="2*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions> <Button>Button 1</Button>
<Button Grid.Column="1">Button 2</Button>
<Button Grid.Column="2">Button 3</Button>
<Button Grid.Row="1">Button 4</Button>
<Button Grid.Column="1" Grid.Row="1">Button 5</Button>
<Button Grid.Column="2" Grid.Row="1">Button 6</Button>
<Button Grid.Row="2">Button 7</Button>
<Button Grid.Column="1" Grid.Row="2">Button 8</Button>
<Button Grid.Column="2" Grid.Row="2">Button 9</Button>
</Grid> </Window>
Disadvantages of WPF
 WPF will not run on Windows 2000 or lower
 WPF’s in-box control suite is far more limited than
that of WinForms
Is WPF Dead in 2021?
• Still the best technology out there for building
desktop applications
• Extremely powerful for creating any PC business
based application
• Businesses that still use applications that were written
in this technology
• Third party support from companies such as Telerik or
Devexpress
WPF Basics: A Guide to Windows Presentation Foundation

More Related Content

What's hot

Architecting WPF Applications
Architecting WPF ApplicationsArchitecting WPF Applications
Architecting WPF ApplicationsPaul Stovell
 
MSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedMSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedDave Bost
 
Introduction to XAML and WPF
Introduction to XAML and WPFIntroduction to XAML and WPF
Introduction to XAML and WPFDoncho Minkov
 
WPF For Beginners - Learn in 3 days
WPF For Beginners  - Learn in 3 daysWPF For Beginners  - Learn in 3 days
WPF For Beginners - Learn in 3 daysUdaya Kumar
 
21 app packaging, monetization and publication
21   app packaging, monetization and publication21   app packaging, monetization and publication
21 app packaging, monetization and publicationWindowsPhoneRocks
 
Introduction to silverlight control 4
Introduction to silverlight control 4Introduction to silverlight control 4
Introduction to silverlight control 4msarangam
 
WPF & Silverlight Intro
WPF & Silverlight IntroWPF & Silverlight Intro
WPF & Silverlight IntroDave Allen
 
2 Day - WPF Training by Adil Mughal
2 Day - WPF Training by Adil Mughal2 Day - WPF Training by Adil Mughal
2 Day - WPF Training by Adil MughalAdil Mughal
 
Session 2: Office as a development platform with Visual Studio 2008
Session 2: Office as a development platform with Visual Studio 2008Session 2: Office as a development platform with Visual Studio 2008
Session 2: Office as a development platform with Visual Studio 2008ukdpe
 
Microsoft Silverlight - An Introduction
Microsoft Silverlight - An IntroductionMicrosoft Silverlight - An Introduction
Microsoft Silverlight - An IntroductionMohammad Elsheimy
 
Modern C&C Systems, Using New Technologies
Modern C&C Systems, Using New TechnologiesModern C&C Systems, Using New Technologies
Modern C&C Systems, Using New TechnologiesTamir Khason
 
Conociendo el ecosistema de Windows Phone 8 y Windows 8
Conociendo el ecosistema de Windows Phone 8 y Windows 8Conociendo el ecosistema de Windows Phone 8 y Windows 8
Conociendo el ecosistema de Windows Phone 8 y Windows 8Sorey García
 
Silverlight Framework Architecture
Silverlight Framework ArchitectureSilverlight Framework Architecture
Silverlight Framework ArchitectureAshok
 

What's hot (20)

Architecting WPF Applications
Architecting WPF ApplicationsArchitecting WPF Applications
Architecting WPF Applications
 
MSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedMSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF Demystified
 
Introduction to XAML and WPF
Introduction to XAML and WPFIntroduction to XAML and WPF
Introduction to XAML and WPF
 
WPF
WPFWPF
WPF
 
WPF For Beginners - Learn in 3 days
WPF For Beginners  - Learn in 3 daysWPF For Beginners  - Learn in 3 days
WPF For Beginners - Learn in 3 days
 
21 app packaging, monetization and publication
21   app packaging, monetization and publication21   app packaging, monetization and publication
21 app packaging, monetization and publication
 
Windows 8
Windows 8Windows 8
Windows 8
 
Introduction to silverlight control 4
Introduction to silverlight control 4Introduction to silverlight control 4
Introduction to silverlight control 4
 
WPF & Silverlight Intro
WPF & Silverlight IntroWPF & Silverlight Intro
WPF & Silverlight Intro
 
2 Day - WPF Training by Adil Mughal
2 Day - WPF Training by Adil Mughal2 Day - WPF Training by Adil Mughal
2 Day - WPF Training by Adil Mughal
 
Session 2: Office as a development platform with Visual Studio 2008
Session 2: Office as a development platform with Visual Studio 2008Session 2: Office as a development platform with Visual Studio 2008
Session 2: Office as a development platform with Visual Studio 2008
 
Microsoft Silverlight - An Introduction
Microsoft Silverlight - An IntroductionMicrosoft Silverlight - An Introduction
Microsoft Silverlight - An Introduction
 
Windows Phone
Windows Phone Windows Phone
Windows Phone
 
Introduction to Microsoft Silverlight
Introduction to Microsoft SilverlightIntroduction to Microsoft Silverlight
Introduction to Microsoft Silverlight
 
Modern C&C Systems, Using New Technologies
Modern C&C Systems, Using New TechnologiesModern C&C Systems, Using New Technologies
Modern C&C Systems, Using New Technologies
 
Windows Phone
Windows PhoneWindows Phone
Windows Phone
 
WPF - An introduction
WPF - An introductionWPF - An introduction
WPF - An introduction
 
Conociendo el ecosistema de Windows Phone 8 y Windows 8
Conociendo el ecosistema de Windows Phone 8 y Windows 8Conociendo el ecosistema de Windows Phone 8 y Windows 8
Conociendo el ecosistema de Windows Phone 8 y Windows 8
 
Silverlight
SilverlightSilverlight
Silverlight
 
Silverlight Framework Architecture
Silverlight Framework ArchitectureSilverlight Framework Architecture
Silverlight Framework Architecture
 

Similar to WPF Basics: A Guide to Windows Presentation Foundation

Dot Net Training Dot Net35
Dot Net Training Dot Net35Dot Net Training Dot Net35
Dot Net Training Dot Net35Subodh Pushpak
 
Training for New Users
Training for New UsersTraining for New Users
Training for New UsersAVEVA
 
Complete WPF Overview Tutorial with Example - iFour Technolab
Complete WPF Overview Tutorial with Example - iFour TechnolabComplete WPF Overview Tutorial with Example - iFour Technolab
Complete WPF Overview Tutorial with Example - iFour TechnolabiFour Technolab Pvt. Ltd.
 
Flex and .NET Integration
Flex and .NET IntegrationFlex and .NET Integration
Flex and .NET Integrationicaraion
 
Windows Presentation Foundation: The Opportunity for WPF Applications in the …
Windows Presentation Foundation: The Opportunity for WPF Applications in the …Windows Presentation Foundation: The Opportunity for WPF Applications in the …
Windows Presentation Foundation: The Opportunity for WPF Applications in the …goodfriday
 
Windows Phone 8.1 アプリ開発徹底解説
Windows Phone 8.1 アプリ開発徹底解説Windows Phone 8.1 アプリ開発徹底解説
Windows Phone 8.1 アプリ開発徹底解説shinobu takahashi
 
Building Windows Presentation Foundation (WPF) Application
Building Windows Presentation Foundation (WPF) ApplicationBuilding Windows Presentation Foundation (WPF) Application
Building Windows Presentation Foundation (WPF) Applicationssusere19c741
 
Building Windows Presentation Foundation (WPF) Application
Building Windows Presentation Foundation (WPF) ApplicationBuilding Windows Presentation Foundation (WPF) Application
Building Windows Presentation Foundation (WPF) Applicationssusere19c741
 
Introduction to Windows App Development
Introduction to Windows App DevelopmentIntroduction to Windows App Development
Introduction to Windows App DevelopmentSourav Bhattacharya
 
Developing RIAs... 10 reasons to use Adobe Flex
Developing RIAs... 10 reasons to use Adobe FlexDeveloping RIAs... 10 reasons to use Adobe Flex
Developing RIAs... 10 reasons to use Adobe FlexMatthias Zeller
 
Raj Wpf Controls
Raj Wpf ControlsRaj Wpf Controls
Raj Wpf Controlsrramabad
 
WPF Applications, It's all about XAML these days
WPF Applications, It's all about XAML these daysWPF Applications, It's all about XAML these days
WPF Applications, It's all about XAML these daysDave Bost
 
Flex In Dot Net
Flex In Dot NetFlex In Dot Net
Flex In Dot Netpradeepfdo
 
Btb017 David
Btb017 DavidBtb017 David
Btb017 DavidRohit Ray
 
Making Money with Adobe AIR
Making Money with Adobe AIRMaking Money with Adobe AIR
Making Money with Adobe AIRAlmog Koren
 
Visual Studio 2008 & .Net 3.5
Visual Studio 2008 & .Net 3.5Visual Studio 2008 & .Net 3.5
Visual Studio 2008 & .Net 3.5Hadi Karimi
 

Similar to WPF Basics: A Guide to Windows Presentation Foundation (20)

Silverlight Training
Silverlight TrainingSilverlight Training
Silverlight Training
 
Wpf 1
Wpf 1Wpf 1
Wpf 1
 
Dot Net Training Dot Net35
Dot Net Training Dot Net35Dot Net Training Dot Net35
Dot Net Training Dot Net35
 
Training for New Users
Training for New UsersTraining for New Users
Training for New Users
 
Complete WPF Overview Tutorial with Example - iFour Technolab
Complete WPF Overview Tutorial with Example - iFour TechnolabComplete WPF Overview Tutorial with Example - iFour Technolab
Complete WPF Overview Tutorial with Example - iFour Technolab
 
Flex and .NET Integration
Flex and .NET IntegrationFlex and .NET Integration
Flex and .NET Integration
 
Windows Presentation Foundation: The Opportunity for WPF Applications in the …
Windows Presentation Foundation: The Opportunity for WPF Applications in the …Windows Presentation Foundation: The Opportunity for WPF Applications in the …
Windows Presentation Foundation: The Opportunity for WPF Applications in the …
 
Windows Phone 8.1 アプリ開発徹底解説
Windows Phone 8.1 アプリ開発徹底解説Windows Phone 8.1 アプリ開発徹底解説
Windows Phone 8.1 アプリ開発徹底解説
 
Building Windows Presentation Foundation (WPF) Application
Building Windows Presentation Foundation (WPF) ApplicationBuilding Windows Presentation Foundation (WPF) Application
Building Windows Presentation Foundation (WPF) Application
 
Building Windows Presentation Foundation (WPF) Application
Building Windows Presentation Foundation (WPF) ApplicationBuilding Windows Presentation Foundation (WPF) Application
Building Windows Presentation Foundation (WPF) Application
 
Introduction to Windows App Development
Introduction to Windows App DevelopmentIntroduction to Windows App Development
Introduction to Windows App Development
 
Developing RIAs... 10 reasons to use Adobe Flex
Developing RIAs... 10 reasons to use Adobe FlexDeveloping RIAs... 10 reasons to use Adobe Flex
Developing RIAs... 10 reasons to use Adobe Flex
 
Raj Wpf Controls
Raj Wpf ControlsRaj Wpf Controls
Raj Wpf Controls
 
WPF Applications, It's all about XAML these days
WPF Applications, It's all about XAML these daysWPF Applications, It's all about XAML these days
WPF Applications, It's all about XAML these days
 
Flex In Dot Net
Flex In Dot NetFlex In Dot Net
Flex In Dot Net
 
Btb017 David
Btb017 DavidBtb017 David
Btb017 David
 
Making Money with Adobe AIR
Making Money with Adobe AIRMaking Money with Adobe AIR
Making Money with Adobe AIR
 
Visual Studio 2008 & .Net 3.5
Visual Studio 2008 & .Net 3.5Visual Studio 2008 & .Net 3.5
Visual Studio 2008 & .Net 3.5
 
What is Adobe Flex ?
What is Adobe Flex  ?What is Adobe Flex  ?
What is Adobe Flex ?
 
Adobe® Flex™
Adobe® Flex™Adobe® Flex™
Adobe® Flex™
 

Recently uploaded

Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 

Recently uploaded (20)

Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 

WPF Basics: A Guide to Windows Presentation Foundation

  • 2. Better UI Statistics  When UI improves the customer experience, it raises a company’s KPIs up to 83% in conversion lift.  Research shows that, on average, every $1 invested in UI and UX brings $100 in return. That’s an ROI of a whopping 9,900%.  8 in 10 customers are willing to pay more for better customer experience.
  • 3. What is WPF?  WPF stands for Windows Presentation Foundation.  It is a UI framework for building Windows desktop applications.  WPF supports a broad set of application development features, including an application model, resources, controls, graphics, layout, data binding and documents.  WPF uses the Extensible Application Markup Language (XAML) to provide a declarative model for application programming.
  • 4. History Of WPF 2000 Work began under code name AVALON 2005 AVALON was renamed to WPF 2006 WPF released as a part of .Net Framework 3.0 2018 Microsoft announced WPF as open source project on GitHub
  • 5. Resolution Independent Animations Data Binding 2D & 3D Media Services Interoperability Templates 1 2 3 4 5 6 FEATURES
  • 6. WPF Architecture Presentation Framework Presentation Core CLR Kernel milicore DirectX User32 Managed Code Unmanaged Code
  • 7. How to Create your first WPF Application? Step 1) Open Visual Studio And Create A New Project
  • 8. How to Create your first WPF Application? Step 2) Select WPF App(.Net Framework) and click Next
  • 9. How to Create your first WPF Application? Step 3) Assign name to your project an Click on Create
  • 10. How to Create your first WPF Application? Step 4)The Project window Opens up with code window and design window
  • 11. How to Create your first WPF Application? Step 5) From Toolbox double click on Textbox and the code will be automatically generated
  • 12. How to Create your first WPF Application? Step 6) To test your program click on the start button
  • 13. How to Create your first WPF Application? Step 7) The project will start running
  • 14. What is XAML?  It stands for eXtensible Application Markup Language.  Simple and declarative language based on XML  Mainly used for designing GUIs Basic Syntax:- <Window x:Class = "Resources.MainWindow" xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x = "http://schemas.microsoft.com/winfx/2006/xaml" Title = "MainWindow" Height = "350" Width = "525"> <Grid> </Grid> </Window>
  • 16. WPF Layouts Stack Panel Wrap Panel Canvas Panel Grid Panel Dock Panel Some of the most commonly used and popular layout panels:-
  • 17. 1. Stack Panel <Window x:Class="WpfTutorial.Panels.StackPanel" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="StackPanel" Height="160" Width="300"> <StackPanel> <Button>Button 1</Button> <Button>Button 2</Button> <Button>Button 3</Button> <Button>Button 4</Button> <Button>Button 5</Button> <Button>Button 6</Button> </StackPanel> </Window> <Window x:Class="WpfTutorial.Panels.StackPanel" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="StackPanel" Height="160" Width="300"> <StackPanel Orientation="Horizontal"> <Button>Button 1</Button> <Button>Button 2</Button> <Button>Button 3</Button> <Button>Button 4</Button> <Button>Button 5</Button> <Button>Button 6</Button> </StackPanel> </Window>
  • 18. 2. Wrap Panel <Window x:Class="WpfTutorialSamples.Panels.WrapPanel" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="WrapPanel" Height="300" Width="300"> <WrapPanel> <Button>Test button 1</Button> <Button>Test button 2</Button> <Button>Test button 3</Button> <Button Height="40">Test button 4</Button> <Button>Test button 5</Button> <Button>Test button 6</Button> </WrapPanel> </Window> <Window x:Class="WpfTutorialSamples.Panels.WrapPanel" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="WrapPanel" Height="120" Width="300"> <WrapPanel Orientation="Vertical"> <Button>Test button 1</Button> <Button>Test button 2</Button> <Button>Test button 3</Button> <Button Width="140">Test button 4</Button> <Button>Test button 5</Button> <Button>Test button 6</Button> </WrapPanel> </Window>
  • 19. 3. Dock Panel <Window x:Class="WpfTutorialSamples.Panels.DockPanel" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="DockPanel" Height="250" Width="250"> <DockPanel> <Button DockPanel.Dock="Left">Left</Button> <Button DockPanel.Dock="Top">Top</Button> <Button DockPanel.Dock="Right">Right</Button> <Button DockPanel.Dock="Bottom">Bottom</Button> <Button>Center</Button> </DockPanel> </Window>
  • 20. 4. Canvas Panel <Window x:Class="WpfTutorialSamples.Panels.Canvas" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Canvas" Height="200" Width="200"> <Canvas> <Button Canvas.Left="10">Top left</Button> <Button Canvas.Right="10">Top right</Button> <Button Canvas.Left="10" Canvas.Bottom="10">Bottom left</Button> <Button Canvas.Right="10" Canvas.Bottom="10">Bottom right</Button> </Canvas> </Window> <Window x:Class="WpfTutorialSamples.Panels.CanvasZIndex" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="CanvasZIndex" Height="275" Width="260"> <Canvas> <Ellipse Panel.ZIndex="2" Fill="Gainsboro" Canvas.Left="25" Canvas.Top="25" Width="200" Height="200" /> <Rectangle Panel.ZIndex="3" Fill="LightBlue" Canvas.Left="25" Canvas.Top="25" Width="50" Height="50" /> <Rectangle Panel.ZIndex="2" Fill="LightCoral" Canvas.Left="50" Canvas.Top="50" Width="50" Height="50" /> <Rectangle Panel.ZIndex="4" Fill="LightCyan" Canvas.Left="75" Canvas.Top="75" Width="50" Height="50" /> </Canvas> </Window>
  • 21. 5. Grid Panel <Window x:Class="WpfTutorialSamples.Panels.TabularGrid" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="TabularGrid" Height="300" Width="300"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="2*" /> <ColumnDefinition Width="1*" /> <ColumnDefinition Width="1*" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="2*" /> <RowDefinition Height="1*" /> <RowDefinition Height="1*" /> </Grid.RowDefinitions> <Button>Button 1</Button> <Button Grid.Column="1">Button 2</Button> <Button Grid.Column="2">Button 3</Button> <Button Grid.Row="1">Button 4</Button> <Button Grid.Column="1" Grid.Row="1">Button 5</Button> <Button Grid.Column="2" Grid.Row="1">Button 6</Button> <Button Grid.Row="2">Button 7</Button> <Button Grid.Column="1" Grid.Row="2">Button 8</Button> <Button Grid.Column="2" Grid.Row="2">Button 9</Button> </Grid> </Window>
  • 22. Disadvantages of WPF  WPF will not run on Windows 2000 or lower  WPF’s in-box control suite is far more limited than that of WinForms
  • 23. Is WPF Dead in 2021? • Still the best technology out there for building desktop applications • Extremely powerful for creating any PC business based application • Businesses that still use applications that were written in this technology • Third party support from companies such as Telerik or Devexpress