SlideShare une entreprise Scribd logo
1  sur  13
Télécharger pour lire hors ligne
WPF
(WINDOWS PRESENTATION
FOUNDATION)
Kadir H. Kapadiya
Jr. S/W Developer
What is WPF?
 WPF is the engine that is responsible for creating, displaying, and
manipulating user-interfaces, documents, images, movies, and
media in Windows Vista.
 Physically, WPF is a set of libraries that have all functionality you
need to build, run, execute, and manage Windows Vista
applications.
 WPF combines application UIs, 2D graphics, 3D graphics,
documents and multimedia into one single framework. Its vector
based rendering engine uses hardware acceleration of modern
graphic cards. This makes the UI faster, scalable and resolution
independent.
 Windows Presentation Foundation (WPF) is a next-generation
presentation system for building Windows client applications with
visually stunning user experiences.
 With WPF, you can create a wide range of both standalone and
browser-hosted applications.
 WPF is included in the Microsoft .NET Framework, so you can build
applications that incorporate other elements of the .NET
Framework class library.
Separation of Appearance and Behavior
 WPF separates the appearance of an user interface from its
behavior. The appearance is generally specified in the Extensible
Application Markup Language (XAML), the behavior is
implemented in a managed programming language like C# or
Visual Basic.
 The two parts are tied together by data binding, events and
commands. The separation of appearance and behavior brings
the following benefits:
1. Appearance and behavior are loosely coupled
2. Designers and developers can work on separate models.
3. Graphical design tools can work on simple XML documents instead
of parsing code.
Advantage of WPF:
 Broad Integration: Prior to WPF, it was very difficult to use 3D, Video,
Speech, and rich document viewing in addition to normal 2D
Graphics and controls would have to learn several independent
technologies. WPF covers all these with consisting programming
model as well as tight integration when each type of media gets
composited and rendered.
 Resolution Independence: WPF applications are device
independent i.e., smart client applications. Like normal applications
it don't get decrease the size as the resolution gets increase. This is
possible because WPF emphasis on vector graphics.
 Hardware Acceleration: WPF is built on top of Direct 3D, content in a
WPF application whether 2D or 3D, Graphics or text is converted to
3D triangles, textures and other Direct 3D objects and then rendered
by hardware. WPF applications can get the benefit of hardware
acceleration for smoother graphics and all round better
performance.
 Declarative Programming: WPF takes the declarative programming
to the next level with the introduction of Extensible Application
Markup Language(XAML)
 XAML is like HTML in web used for creating the interface, resulting
graphical designers are empowered to contribute directly to the
look and feel of applications.
WPF Architecture
 WPF is actually a set of assemblies that build up the entire
framework. These assemblies can be categorized as:
1. Managed Layer
2. Unmanaged Layer
3. Core API
 Managed Layer: Managed layer of WPF is built using a number of
assemblies. These assemblies build up the WPF framework,
communicate with lower level unmanaged API to render its
content.
1. PresentationFramework.dll: Creates the top level elements like
layout panels, controls, windows, styles, etc.
2. PresentationCore.dll: It holds base types such as UIElement, Visual
from which all shapes and controls are Derived in
PresentationFramework.dll.
3. WindowsBase.dll: They hold even more basic elements which are
capable of being used outside the WPF environment like
Dispatcher object, Dependency Objects.
 Unmanaged Layer (milcore.dll): The unmanaged layer of WPF is
called milcore or Media Integration Library Core. It basically
translates the WPF higher level objects like layout panels, buttons,
animation, etc. into textures that Direct3D expects. It is the main
rendering engine of WPF.
 WindowsCodecs.dll: This is another low level API which is used for
imaging support in WPF applications. WindowsCodecs.dll
comprises a number of codecs which encode / decode images
into vector graphics that would be rendered into WPF screen.
 Direct3D: It is the low level API in which the graphics of WPF is
rendered.
 User32: It is the primary core API which every program uses. It
actually manages memory and process separation.
 GDI & Device Drivers: GDI and Device Drivers are specific to the
operating system which is also used from the application to
access low level APIs.
<Window x:Class="FirstWindowsApplication.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="Window1"
Title="Window1" Height="300" Width="300">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition MinWidth="50" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Text="Enter Name :" Grid.Row="0" Grid.Column="0" />
<TextBox x:Name="txtName" Grid.Row="0" Grid.Column="1" MinWidth="50"/>
<Button Content="Click Me" Grid.Row="0" Grid.Column="2" Click="Button_Click"/>
</Grid>
</Window>
private void Button_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show(string.Format("Hi {0}", this.txtName.Text));
}
Difference Between WPF And Silverlight:
 WPF is based off of the desktop CLR which is the full version of the
CLR.
 Silverlight is based on a much smaller and more compact CLR
which provides a great experience but does not have the full
breadth of CLR features. It also has a much smaller version of the
BCL.
 WPF you can create Windows App, Navigation app and XBAP (IE
based) application With Silverlight you can create only XAP
(Browser based application.).
 WPF supports 3 types of routed events (direct, bubbling, and
tunneling). Silverlight supports direct and bubbling only.
 Silverlight does not support MultiBinding.
 Silverlight supports the XmlDataProvider but not the
ObjectDataProvider. WPF supports both.
Thank You

Contenu connexe

Tendances

SMART Meeting Pro Personal Software
SMART Meeting Pro Personal SoftwareSMART Meeting Pro Personal Software
SMART Meeting Pro Personal SoftwarePaul Richards
 
Windows phone-7- Introduction
Windows phone-7- IntroductionWindows phone-7- Introduction
Windows phone-7- IntroductionChandra Singh
 
WPF & Silverlight Intro
WPF & Silverlight IntroWPF & Silverlight Intro
WPF & Silverlight IntroDave Allen
 
[Free Chapter 1] Determination of Interface Specifications
[Free Chapter 1] Determination of Interface Specifications[Free Chapter 1] Determination of Interface Specifications
[Free Chapter 1] Determination of Interface SpecificationsAlexis Aronis
 
CV New Updated (November)
CV New Updated (November)CV New Updated (November)
CV New Updated (November)Kavya Ashwath
 
Visual basic 6
Visual basic 6Visual basic 6
Visual basic 6Spy Seat
 
Speed delivery of Android devices and applications with model-driven development
Speed delivery of Android devices and applications with model-driven developmentSpeed delivery of Android devices and applications with model-driven development
Speed delivery of Android devices and applications with model-driven developmentBill Duncan
 
Windows store app development V1
Windows store app development V1Windows store app development V1
Windows store app development V1Foyzul Karim
 
Napoli Napoli UX Day - User eXperience in action con WP7
Napoli Napoli UX Day - User eXperience in action con WP7Napoli Napoli UX Day - User eXperience in action con WP7
Napoli Napoli UX Day - User eXperience in action con WP7Alessandro Scardova
 
Windows 7 For Developers
Windows 7 For DevelopersWindows 7 For Developers
Windows 7 For Developersrsnarayanan
 
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
 

Tendances (20)

Chpater1
Chpater1Chpater1
Chpater1
 
Windows 8
Windows 8Windows 8
Windows 8
 
Silverlight
SilverlightSilverlight
Silverlight
 
Windows 8
Windows 8Windows 8
Windows 8
 
SMART Meeting Pro Personal Software
SMART Meeting Pro Personal SoftwareSMART Meeting Pro Personal Software
SMART Meeting Pro Personal Software
 
Windows phone-7- Introduction
Windows phone-7- IntroductionWindows phone-7- Introduction
Windows phone-7- Introduction
 
IBM Worklight Whitepaper
IBM Worklight WhitepaperIBM Worklight Whitepaper
IBM Worklight Whitepaper
 
WPF & Silverlight Intro
WPF & Silverlight IntroWPF & Silverlight Intro
WPF & Silverlight Intro
 
[Free Chapter 1] Determination of Interface Specifications
[Free Chapter 1] Determination of Interface Specifications[Free Chapter 1] Determination of Interface Specifications
[Free Chapter 1] Determination of Interface Specifications
 
Windows Phone
Windows PhoneWindows Phone
Windows Phone
 
CV New Updated (November)
CV New Updated (November)CV New Updated (November)
CV New Updated (November)
 
Windows mobile
Windows mobileWindows mobile
Windows mobile
 
Visual basic 6
Visual basic 6Visual basic 6
Visual basic 6
 
Speed delivery of Android devices and applications with model-driven development
Speed delivery of Android devices and applications with model-driven developmentSpeed delivery of Android devices and applications with model-driven development
Speed delivery of Android devices and applications with model-driven development
 
Windows store app development V1
Windows store app development V1Windows store app development V1
Windows store app development V1
 
Napoli Napoli UX Day - User eXperience in action con WP7
Napoli Napoli UX Day - User eXperience in action con WP7Napoli Napoli UX Day - User eXperience in action con WP7
Napoli Napoli UX Day - User eXperience in action con WP7
 
Overview visual studio
Overview visual studioOverview visual studio
Overview visual studio
 
Windows 8
Windows 8Windows 8
Windows 8
 
Windows 7 For Developers
Windows 7 For DevelopersWindows 7 For Developers
Windows 7 For Developers
 
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
 

En vedette

En vedette (8)

Big Data
Big DataBig Data
Big Data
 
Big Data
Big DataBig Data
Big Data
 
Big data – a brief overview
Big data – a brief overviewBig data – a brief overview
Big data – a brief overview
 
Big data : Coudbells.com
Big data : Coudbells.comBig data : Coudbells.com
Big data : Coudbells.com
 
Big Data - A brief introduction
Big Data - A brief introductionBig Data - A brief introduction
Big Data - A brief introduction
 
What is big data?
What is big data?What is big data?
What is big data?
 
Big data ppt
Big  data pptBig  data ppt
Big data ppt
 
What is Big Data?
What is Big Data?What is Big Data?
What is Big Data?
 

Similaire à WPF

Windows presentation foundation
Windows presentation foundationWindows presentation foundation
Windows presentation foundationNaga Harish M
 
Wpf architecture
Wpf architectureWpf architecture
Wpf architecturelostseeker
 
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
 
Microsoft Virtualization View
Microsoft Virtualization View Microsoft Virtualization View
Microsoft Virtualization View sanjoysanyal
 
Windows 10 UWP Development Overview
Windows 10 UWP Development OverviewWindows 10 UWP Development Overview
Windows 10 UWP Development OverviewDevGAMM Conference
 
Windows Presentation Foundation & XAML
Windows Presentation Foundation & XAMLWindows Presentation Foundation & XAML
Windows Presentation Foundation & XAMLAlex Sooraj
 
History of silverlight versions and its features
History of silverlight versions and its featuresHistory of silverlight versions and its features
History of silverlight versions and its featuresDiya Singh
 
Windows Phone 8.1 アプリ開発徹底解説
Windows Phone 8.1 アプリ開発徹底解説Windows Phone 8.1 アプリ開発徹底解説
Windows Phone 8.1 アプリ開発徹底解説shinobu takahashi
 
Introduction to WPF
Introduction to WPFIntroduction to WPF
Introduction to WPFMunish Arora
 
Wifi Direct Based Chat And File Transfer Android Application
Wifi Direct Based Chat And File Transfer Android ApplicationWifi Direct Based Chat And File Transfer Android Application
Wifi Direct Based Chat And File Transfer Android ApplicationNitin Bhasin
 

Similaire à WPF (20)

WPF
WPFWPF
WPF
 
480 483
480 483480 483
480 483
 
Windows presentation foundation
Windows presentation foundationWindows presentation foundation
Windows presentation foundation
 
Introduction to wpf
Introduction to wpfIntroduction to wpf
Introduction to wpf
 
Dot Net Overview
Dot Net OverviewDot Net Overview
Dot Net Overview
 
Wpf architecture
Wpf architectureWpf architecture
Wpf architecture
 
An Overview Of Wpf
An Overview Of WpfAn Overview Of Wpf
An Overview Of Wpf
 
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
 
Microsoft Virtualization View
Microsoft Virtualization View Microsoft Virtualization View
Microsoft Virtualization View
 
Windows 10 UWP Development Overview
Windows 10 UWP Development OverviewWindows 10 UWP Development Overview
Windows 10 UWP Development Overview
 
Silverlight
SilverlightSilverlight
Silverlight
 
Windows Presentation Foundation & XAML
Windows Presentation Foundation & XAMLWindows Presentation Foundation & XAML
Windows Presentation Foundation & XAML
 
Wpf 1
Wpf 1Wpf 1
Wpf 1
 
Building RIA Apps with Silverlight
Building RIA Apps with SilverlightBuilding RIA Apps with Silverlight
Building RIA Apps with Silverlight
 
History of silverlight versions and its features
History of silverlight versions and its featuresHistory of silverlight versions and its features
History of silverlight versions and its features
 
Windows Phone 8.1 アプリ開発徹底解説
Windows Phone 8.1 アプリ開発徹底解説Windows Phone 8.1 アプリ開発徹底解説
Windows Phone 8.1 アプリ開発徹底解説
 
Silverlight vs WPF
Silverlight vs WPFSilverlight vs WPF
Silverlight vs WPF
 
Introduction to WPF
Introduction to WPFIntroduction to WPF
Introduction to WPF
 
Wifi Direct Based Chat And File Transfer Android Application
Wifi Direct Based Chat And File Transfer Android ApplicationWifi Direct Based Chat And File Transfer Android Application
Wifi Direct Based Chat And File Transfer Android Application
 

Plus de ipower softwares (10)

Website Security
Website SecurityWebsite Security
Website Security
 
jQuery Mobile
jQuery MobilejQuery Mobile
jQuery Mobile
 
Entity Framework
Entity FrameworkEntity Framework
Entity Framework
 
Angular JS
Angular JSAngular JS
Angular JS
 
Big Data
Big DataBig Data
Big Data
 
Media Query
Media QueryMedia Query
Media Query
 
Phone Gap
Phone GapPhone Gap
Phone Gap
 
WCF (Windows Communication Foundation)
WCF (Windows Communication Foundation)WCF (Windows Communication Foundation)
WCF (Windows Communication Foundation)
 
Windows phone 8 (mvvm)
Windows phone 8 (mvvm)Windows phone 8 (mvvm)
Windows phone 8 (mvvm)
 
Mvc 4
Mvc 4Mvc 4
Mvc 4
 

Dernier

VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdfAndrey Devyatkin
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxUnderstanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxSasikiranMarri
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
Mastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxMastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxAS Design & AST.
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfkalichargn70th171
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 

Dernier (20)

VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxUnderstanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
Mastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxMastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptx
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 

WPF

  • 2. What is WPF?  WPF is the engine that is responsible for creating, displaying, and manipulating user-interfaces, documents, images, movies, and media in Windows Vista.  Physically, WPF is a set of libraries that have all functionality you need to build, run, execute, and manage Windows Vista applications.  WPF combines application UIs, 2D graphics, 3D graphics, documents and multimedia into one single framework. Its vector based rendering engine uses hardware acceleration of modern graphic cards. This makes the UI faster, scalable and resolution independent.
  • 3.  Windows Presentation Foundation (WPF) is a next-generation presentation system for building Windows client applications with visually stunning user experiences.  With WPF, you can create a wide range of both standalone and browser-hosted applications.  WPF is included in the Microsoft .NET Framework, so you can build applications that incorporate other elements of the .NET Framework class library.
  • 4. Separation of Appearance and Behavior  WPF separates the appearance of an user interface from its behavior. The appearance is generally specified in the Extensible Application Markup Language (XAML), the behavior is implemented in a managed programming language like C# or Visual Basic.  The two parts are tied together by data binding, events and commands. The separation of appearance and behavior brings the following benefits: 1. Appearance and behavior are loosely coupled 2. Designers and developers can work on separate models. 3. Graphical design tools can work on simple XML documents instead of parsing code.
  • 5. Advantage of WPF:  Broad Integration: Prior to WPF, it was very difficult to use 3D, Video, Speech, and rich document viewing in addition to normal 2D Graphics and controls would have to learn several independent technologies. WPF covers all these with consisting programming model as well as tight integration when each type of media gets composited and rendered.  Resolution Independence: WPF applications are device independent i.e., smart client applications. Like normal applications it don't get decrease the size as the resolution gets increase. This is possible because WPF emphasis on vector graphics.  Hardware Acceleration: WPF is built on top of Direct 3D, content in a WPF application whether 2D or 3D, Graphics or text is converted to 3D triangles, textures and other Direct 3D objects and then rendered by hardware. WPF applications can get the benefit of hardware acceleration for smoother graphics and all round better performance.  Declarative Programming: WPF takes the declarative programming to the next level with the introduction of Extensible Application Markup Language(XAML)  XAML is like HTML in web used for creating the interface, resulting graphical designers are empowered to contribute directly to the look and feel of applications.
  • 6. WPF Architecture  WPF is actually a set of assemblies that build up the entire framework. These assemblies can be categorized as: 1. Managed Layer 2. Unmanaged Layer 3. Core API
  • 7.  Managed Layer: Managed layer of WPF is built using a number of assemblies. These assemblies build up the WPF framework, communicate with lower level unmanaged API to render its content. 1. PresentationFramework.dll: Creates the top level elements like layout panels, controls, windows, styles, etc. 2. PresentationCore.dll: It holds base types such as UIElement, Visual from which all shapes and controls are Derived in PresentationFramework.dll. 3. WindowsBase.dll: They hold even more basic elements which are capable of being used outside the WPF environment like Dispatcher object, Dependency Objects.
  • 8.  Unmanaged Layer (milcore.dll): The unmanaged layer of WPF is called milcore or Media Integration Library Core. It basically translates the WPF higher level objects like layout panels, buttons, animation, etc. into textures that Direct3D expects. It is the main rendering engine of WPF.  WindowsCodecs.dll: This is another low level API which is used for imaging support in WPF applications. WindowsCodecs.dll comprises a number of codecs which encode / decode images into vector graphics that would be rendered into WPF screen.  Direct3D: It is the low level API in which the graphics of WPF is rendered.  User32: It is the primary core API which every program uses. It actually manages memory and process separation.  GDI & Device Drivers: GDI and Device Drivers are specific to the operating system which is also used from the application to access low level APIs.
  • 9.
  • 10. <Window x:Class="FirstWindowsApplication.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="Window1" Title="Window1" Height="300" Width="300"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition MinWidth="50" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <TextBlock Text="Enter Name :" Grid.Row="0" Grid.Column="0" /> <TextBox x:Name="txtName" Grid.Row="0" Grid.Column="1" MinWidth="50"/> <Button Content="Click Me" Grid.Row="0" Grid.Column="2" Click="Button_Click"/> </Grid> </Window>
  • 11. private void Button_Click(object sender, RoutedEventArgs e) { MessageBox.Show(string.Format("Hi {0}", this.txtName.Text)); }
  • 12. Difference Between WPF And Silverlight:  WPF is based off of the desktop CLR which is the full version of the CLR.  Silverlight is based on a much smaller and more compact CLR which provides a great experience but does not have the full breadth of CLR features. It also has a much smaller version of the BCL.  WPF you can create Windows App, Navigation app and XBAP (IE based) application With Silverlight you can create only XAP (Browser based application.).  WPF supports 3 types of routed events (direct, bubbling, and tunneling). Silverlight supports direct and bubbling only.  Silverlight does not support MultiBinding.  Silverlight supports the XmlDataProvider but not the ObjectDataProvider. WPF supports both.