windows presentation foundation & xaml

66
Windows Presentation Foundation & <XAML> Alex S R 12132265

Upload: alex-sooraj

Post on 14-Jul-2015

209 views

Category:

Software


3 download

TRANSCRIPT

Page 1: Windows Presentation Foundation & XAML

Windows Presentation Foundation & <XAML>

Alex S R

12132265

Page 2: Windows Presentation Foundation & XAML

Thank God

Page 3: Windows Presentation Foundation & XAML

Thanks to teachers

Page 4: Windows Presentation Foundation & XAML

Thanks to all my dear friends

Page 5: Windows Presentation Foundation & XAML

Special Thanks to

Microsoft

Page 6: Windows Presentation Foundation & XAML

Let’s Start

Page 7: Windows Presentation Foundation & XAML

Windows Presentation Foundation (WPF)

WPF is the new graphical subsystem in Windows Operating System

that built with .NET framework.

Physically, it is a collection of class libraries that comes with all the

latest versions of .NET framework for creating and executing rich and

interactive User Interface (Presentation).

Windows is a registered trademark of Microsoft Corporation. And all other logos are trademarks of their respective owners.

Page 8: Windows Presentation Foundation & XAML

Windows Presentation Foundation (WPF)

Supported Languages: C# .NET, VB .NET

Developers Tools: Visual Studio, Expression Studio

Page 9: Windows Presentation Foundation & XAML

WPFWindows Presentation Foundation

WPF is the latest graphicalsubsystem in Windows OperatingSystem to build and execute Appswith rich UI in a more easier andstandardized manner.

WPF can be used to build visually rich UI

Page 10: Windows Presentation Foundation & XAML

WPFWindows Presentation Foundation

WPF is the latest graphicalsubsystem in Windows OperatingSystem to build and execute Appswith rich UI in a more easier andstandardized manner.

WPF is Hardware Accelerated

All WPF graphics are Direct3D applications

Direct3D (part of DirectX) is used in graphical

applications where performance is important

Uses the video card hardware for rendering

Page 11: Windows Presentation Foundation & XAML

.NET Framework

Page 12: Windows Presentation Foundation & XAML

Microsoft .NET Framework

.NET (dot Net) is a software framework that includes everything required

for developing software and services for Microsoft’s products.

Windows Windows Phone Windows RT Web Apps Xbox

Page 13: Windows Presentation Foundation & XAML

DirectX

Page 14: Windows Presentation Foundation & XAML

Microsoft DirectX

DirectX is a set of low level Application Programming Interface (API) that

provides Windows programs with high performance hardware

accelerated multimedia support. Generally all Graphics Processing Units

(GPU) supports DirectX. WPF libraries are built on top of DirectX.

Page 15: Windows Presentation Foundation & XAML

XAML

Page 16: Windows Presentation Foundation & XAML

XAML

XAML stands for eXtensible Application Markup Language

Declarative markup language for building UI

Based on XML

Used to simplify creation of UI for .NET apps

Separates presentation from business logic.

Page 17: Windows Presentation Foundation & XAML

XAMLeXtensible Application Markup Language

A declarative markup language forrepresenting structured data andUI elements.

XAML is a declarative language

XAML describes the behavior and integration of

components (in most cases UI components)

Cannot describe business logic

Page 18: Windows Presentation Foundation & XAML

XAMLeXtensible Application Markup Language

A declarative markup language forrepresenting structured data andUI elements.

XAML in WPF

WPF employs XAML, an XML-based language, to define

and link various interface elements

Just acts like the concept of CSS

Provides a clear separation between the UI (XAML) and

the business logic (C#,VB.NET)

Page 19: Windows Presentation Foundation & XAML

<Window x:Class="MyFirstWpfApp.MainWindow" xmlns=

"http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml

Title="Hello, WPF" Height="300" Width="300">

<Button x:Name="button"

Width="200"

Height="25">OK</Button>

</Window>

Sample XAML code

Page 20: Windows Presentation Foundation & XAML

Features of WPF

Page 21: Windows Presentation Foundation & XAML

Featuresof WPF

All WPF Applications are DirectXbased.

Vector graphics

Supports time-based animations.

It can Incorporate multimediacontents and documents moreeasily.

Page 22: Windows Presentation Foundation & XAML

Featuresof WPF

All WPF Applications are DirectXbased.

Vector graphics

Supports time-based animations.

It can Incorporate multimediacontents and documents moreeasily.

Maximize Hardware Acceleration

WPF uses DirectX for media rendering where old

Windows Forms Application uses GDI+(Graphics Device

Interface)

So it offloads works to Graphics Processing Unit (GPU)

instead of CPU

The result is high quality rich media UI

Page 23: Windows Presentation Foundation & XAML

Featuresof WPF

All WPF Applications are DirectXbased.

Vector graphics

Supports time-based animations.

It can Incorporate multimediacontents and documents moreeasily.

Vector graphics

Vector graphics allows scale without loss in quality

That’s what makes WPF a resolution-independent

architecture

Page 24: Windows Presentation Foundation & XAML

Featuresof WPF

All WPF Applications are DirectXbased.

Vector graphics

Supports time-based animations.

It can Incorporate multimediacontents and documents moreeasily.

Time-based Animation

Presentation timers are initialized and managed by WPF

Scene changes coordinated by using a storyboard

Page 25: Windows Presentation Foundation & XAML

Featuresof WPF

All WPF Applications are DirectXbased.

Vector graphics

Supports time-based animations.

It can Incorporate multimediacontents and documents moreeasily.

Easy to incorporate multimedia

WPF can incorporate audio and video into a user interface

WPF create multimedia applications with real-time graphics

Videos Music Images Documents

Page 26: Windows Presentation Foundation & XAML

How XAML is generated and works ?

Page 27: Windows Presentation Foundation & XAML

XAML Generators

There is a number of tools available today to creatively design the GUI

using XAML

These tools can automatically generate the XAML output file

So that designers as well as developers can concentrate on expressing

their creativity rather than coding

Visual Studio Expression Studio ZAM 3D

Page 28: Windows Presentation Foundation & XAML

XAML FileXAML

ProcessorCode

.NET

Compiler

Source

Code

.DLL/.EXE

Assembly

This is how XAML Works

Page 29: Windows Presentation Foundation & XAML

XAML FileXAML

ProcessorCode

.NET

Compiler

Source

Code

.DLL/.EXE

Assembly

When a WPF application has compiled in Visual Studio or Expression Studio all the XAML files are converted into BAML (Binary Application Markup Language)

Page 30: Windows Presentation Foundation & XAML

XAML FileXAML

ProcessorCode

.NET

Compiler

Source

Code

.DLL/.EXE

Assembly

BAML will be embedded as a resource into the final Dynamic Link Library (.dll) or Executable (.exe) assembly.

Page 31: Windows Presentation Foundation & XAML

XAML FileXAML

ProcessorCode

.NET

Compiler

Source

Code

.DLL/.EXE

Assembly

At run-time, the framework engine extracts this .BAML file from assemblyresource, parses it and creates a corresponding WPF visual tree orworkflow.

Page 32: Windows Presentation Foundation & XAML

Applications of XAML

Page 33: Windows Presentation Foundation & XAML

Applicationsof XAML

XAML is using for building WPFUser Interface

Web based application usingMicrosoft Silverlight

To design UI of Windows PhoneApps

To design UI of Windows StoreApps

Used to design WindowsWorkflow Foundation

XAML Paper Specification (XPS)documents.

Page 34: Windows Presentation Foundation & XAML

Applicationsof XAML

XAML is using for building WPFUser Interface

Web based application usingMicrosoft Silverlight

To design UI of Windows PhoneApps

To design UI of Windows StoreApps

Used to design WindowsWorkflow Foundation

XAML Paper Specification (XPS)documents.

As already explained

WPF employs XAML, an XML-based language, to define

and link various interface elements

Just acts like CSS for HTML

Provides a clear separation between the UI (XAML) and

the business logic (C#,VB.NET)

Page 35: Windows Presentation Foundation & XAML

Applicationsof XAML

XAML is using for building WPFUser Interface

Web based application usingMicrosoft Silverlight

To design UI of Windows PhoneApps

To design UI of Windows StoreApps

Used to design WindowsWorkflow Foundation

XAML Paper Specification (XPS)documents.

Microsoft Silverlight

Silverlight is a cross-platform, cross-browser plugin,

which contains WPF-based technology

Rich Internet Application (RIA) platform

Including XAML and subset of WPF

Provides rich-media features such as video, vector

graphics, and animations

Page 36: Windows Presentation Foundation & XAML

Applicationsof XAML

XAML is using for building WPFUser Interface

Web based application usingMicrosoft Silverlight

To design UI of Windows PhoneApps

To design UI of Windows StoreApps

Used to design WindowsWorkflow Foundation

XAML Paper Specification (XPS)documents.

Microsoft Silverlight

Silverlight and WPF share the XAML presentation layer

Both technologies are similar, but Silverlight is limited in

many aspects

Page 37: Windows Presentation Foundation & XAML

Applicationsof XAML

XAML is using for building WPFUser Interface

Web based application usingMicrosoft Silverlight

To design UI of Windows PhoneApps

To design UI of Windows StoreApps

Used to design WindowsWorkflow Foundation

XAML Paper Specification (XPS)documents.

Windows Phone

12:38

Start

Windows Phone (WP) is a

smartphone operating system

developed by Microsoft

With WP, Microsoft created a new

user interface featuring a design

language called Metro or Modern

Developers can develop WP apps

using C#.NET, Visual Basic .NET,

and HTML5/JavaScript

Page 38: Windows Presentation Foundation & XAML

Applicationsof XAML

XAML is using for building WPFUser Interface

Web based application usingMicrosoft Silverlight

To design UI of Windows PhoneApps

To design UI of Windows StoreApps

Used to design WindowsWorkflow Foundation

XAML Paper Specification (XPS)documents.

Windows Phone

Microsoft offers Expression Blend (a part of Expression

Studio) for designing WP UI, which itself uses XAML for UI

designing

Page 39: Windows Presentation Foundation & XAML

Applicationsof XAML

XAML is using for building WPFUser Interface

Web based application usingMicrosoft Silverlight

To design UI of Windows PhoneApps

To design UI of Windows StoreApps

Used to design WindowsWorkflow Foundation

XAML Paper Specification (XPS)documents.

Windows Store Apps

Windows Store Apps are designed to run on Windows on

ARM (WOA) also known as Windows RT. Eg: Windows RT

runs on Microsoft Surface Tablet

WinRT is a new API for developing Windows Store Apps

There is a layer in Windows 8 OS to run Windows Store

Apps

It’s UI is also designed using XAML

Page 40: Windows Presentation Foundation & XAML

Applicationsof XAML

XAML is using for building WPFUser Interface

Web based application usingMicrosoft Silverlight

To design UI of Windows PhoneApps

To design UI of Windows StoreApps

Used to design WindowsWorkflow Foundation

XAML Paper Specification (XPS)documents.

Windows Workflow Foundation

A workflow is the series of steps, decisions, and rules

needed to complete a specific task.

Windows Workflow Foundation is a set of classes and

design tools that help developers to create and develop

workflows into their complex applications

XAML brings a declarative programming model to

Windows Workflow

Page 41: Windows Presentation Foundation & XAML

Applicationsof XAML

XAML is using for building WPFUser Interface

Web based application usingMicrosoft Silverlight

To design UI of Windows PhoneApps

To design UI of Windows StoreApps

Used to design WindowsWorkflow Foundation

XAML Paper Specification (XPS)documents.

XPS Documents

XPS (XAML Paper Specification) is an electronic paper

document, an alternative to PDF.

It consists of structured XML markups that defines layout

and visual appearance of each objects in the page

Page 42: Windows Presentation Foundation & XAML

Microsoft Design Language

Page 43: Windows Presentation Foundation & XAML

Content is the heart of Modern UI style apps, and putting content before chrome is fundamental to the design of Modern style apps.

- Microsoft

Page 44: Windows Presentation Foundation & XAML

The innovation here is the fluidity of user experience and focus on the data, without using traditional user interface conventions of windows and frames. Data become the visual elements and Controls.

-Isabel

Page 45: Windows Presentation Foundation & XAML

3:00PM

3/14/2011

Search programs and files

All Programs

Shut Down

Username

Documents

Pictures

Music

Games

Computer

Control Panel

Devices and Printers

Default Programs

Help and Support

Pinned Application

Pinned Application

Application

Application

Application

Application

Application

Application Traditional Start button and taskbar

Page 46: Windows Presentation Foundation & XAML

Web page title

http://www.url.com

Traditional windows and frames

Page 47: Windows Presentation Foundation & XAML

The key design principle is better focus on the content of application, relying more on typography and less on graphics.

“Content before chrome”

Page 48: Windows Presentation Foundation & XAML

Start Alex Sooraj

A tile is the front door into an app

Page 49: Windows Presentation Foundation & XAML

Search

Share

Start

Devices

Settings

Text Text Text Text

Search Apps

Apps

Settings

Files

App

App

App

App

Search

App

App

Button

Title

text!

CancelOK

New

Open…

Save

Save As…

Page Setup…

Print…

Exit

File

C:\Windows\System32\cmd.exe

Microsoft Windows [Version 7.1.7000]Copyright (c) 2008 Microsoft Corporation. All rights reserved.

C:\Users\UserName>

Traditional UI Modern UI

Page 50: Windows Presentation Foundation & XAML
Page 51: Windows Presentation Foundation & XAML
Page 52: Windows Presentation Foundation & XAML

Microsoft SurfaceUsing Microsoft Design Language

Page 53: Windows Presentation Foundation & XAML

Nokia Lumia 920

Page 54: Windows Presentation Foundation & XAML

Xbox 360 System Software

Page 55: Windows Presentation Foundation & XAML

Advantages of XAML

Page 56: Windows Presentation Foundation & XAML

Advantagesof using XAML

XAML code is short and clear toread

Separation of UI designer codeand business logic allows it toclearly separate the role of UIdesigner and developer

Page 57: Windows Presentation Foundation & XAML

Advantagesof using XAML

XAML code is short and clear toread

Separation of UI designer codeand business logic allows it toclearly separate the role of UIdesigner and developer

<Button Content="Click me!"/> Button button=new Button();button.Content="Click me!";

Declarative Style

XAML implements declarative markup style

That’s why XAML is short and clear to read

Declarative Style Programmatical style

Page 58: Windows Presentation Foundation & XAML

Advantagesof using XAML

XAML code is short and clear toread

Separation of UI designer codeand business logic allows it toclearly separate the role of UIdesigner and developer

Separation of designer code and logic

Separation between designer code (XAML) and business

logic (C#,VB code) clearly separates the role of designer

and developer.

Designer

Emotional ConnectionLook, behavior, data visualization,

usability, brand impact

Developer

Functional CapabilitiesDeployment, function, data connection and integrity, IT process, security

Page 59: Windows Presentation Foundation & XAML

Disadvantages of WPF & XAML

Page 60: Windows Presentation Foundation & XAML

Disadvantagesof WPF & XAML

WPF and XAML is not supportedon Windows 2000 or older

WPF requires latest hardwaresupport, and it will not run onold hardware

Page 61: Windows Presentation Foundation & XAML

Disadvantagesof WPF & XAML

WPF and XAML is not supportedon Windows 2000 or older

WPF requires latest hardwaresupport, and it will not run onold hardware

WPF and XAML is not supported on

PCs running Windows 2000 or older

Page 62: Windows Presentation Foundation & XAML

Disadvantagesof WPF & XAML

WPF and XAML is not supportedon Windows 2000 or older

WPF requires latest hardwaresupport, and it will not run onold hardware

WPF requires DirectX supported

hardware, and it will not run on old

hardware

Page 63: Windows Presentation Foundation & XAML

It was a presentation about Presentation

Thanks for being here

Page 64: Windows Presentation Foundation & XAML

References:

Microsoft Developers Network

msdn.microsoft.com

Page 65: Windows Presentation Foundation & XAML

Time for your QuestionsNow,

Page 66: Windows Presentation Foundation & XAML

End of slide show. Swipe to exit.