From Windows Forms to WinRT - Rockford Lhotka

16
From Windows Forms to WinRT Rockford Lhotka Magenic [email protected]

Transcript of From Windows Forms to WinRT - Rockford Lhotka

From Windows Forms to WinRT

Rockford Lhotka

Magenic

[email protected]

Windows Kernel Services

Win32 API WinRT API

.NET 4.5 Client/Full

C#

VB

Silverlight 4 / 5

C#

VB C++

MFC

ATL

Browser

Application Model

COM DirectX Devices / Printing

XAML HTML

WinJS C++ .NET

4.5 WinRT

C#

VB

Dire

ctX

XAML

Windows 8 Development Platform

JavaScript

Dire

ctX

GD

I+

Win

dow

s

Fo

rms

OOB

HTML

JavaScript

Chakra

Chakra

Communications Graphics & Media Data

COM GDI+ Devices / Printing

DCOM DirectX File system

Windows Kernel Services

.NET 4.5 Client/Full

C#

VB

Silverlight 4 / 5

C#

VB

HTML

C++

MFC

ATL

Browser

XAML HTML

C++ .NET

4.5 WinRT

C#

VB

Dire

ctX

XAML

Windows Forms in Windows 8

JavaScript

Dire

ctX

GD

I+

Win

dow

s

Fo

rms

OOB

WinJS

Chakra

JavaScript

Chakra

Win32 API WinRT API

Application Model

COM DirectX Devices / Printing

Communications Graphics & Media Data

COM GDI+ Devices / Printing

DCOM DirectX File system

Windows Kernel Services

.NET 4.5 Client/Full

C#

VB

Silverlight 4 / 5

C#

VB

HTML

C++

MFC

ATL

Browser

XAML HTML

C++ .NET

4.5 WinRT

C#

VB

Dire

ctX

XAML

WinRT .NET Apps in Windows 8

JavaScript

Dire

ctX

GD

I+

Win

dow

s

Fo

rms

OOB

JavaScript

Chakra WinJS

Chakra

Win32 API WinRT API

Application Model

COM DirectX Devices / Printing

Communications Graphics & Media Data

COM GDI+ Devices / Printing

DCOM DirectX File system

Win

7

Win

8

WinRT Desktop

Windows

Forms WPF Silverlight XAML HTML HTML

C#/VB C#/VB C#/VB ASP.NET C#/VB JavaScript

Windows

Forms WPF Silverlight HTML

C#/VB C#/VB C#/VB ASP.NET

Little to no effort

Reasonable effort

Reasonable effort with limitations and prep

Skills and some code assets transfer

Window Forms

VB

C#

UI

Forms Data

DataSet Objects

WinRT

VB

C#

js

UI

XAML

HTML

Data

Objects

Primary Areas of Concern

XAML

DataSet

Data binding

Asynchronous behaviors

Sandbox environment

Application model / lifecycle

Navigation

XAML

• Styles, templates = total control

• Animations, storyboards

• Visual state manager

More expressive than WinForms

• Looks similar to HTML

• Acts like a compiled language

• Language is declarative

Explicit “markup” language

DataSet

Replace with collections

ObservableCollection<T>

INotifyPropertyChanged

Data Binding

INotifyPropertyChanged

ObservableCollection<T>

INotifyDataErrorInfo

Asynchronous Behaviors

Data access

File access

Server access

More…

Sandbox Environment

Limited access to

local resources

Limited network access

Limited use of reflection

Application Lifecycle

Activation

Suspend

Deactivation

Termination

OnLaunched OnSuspended

Navigation

OS Move between apps with gesture

Handled by Windows

App Move between views with buttons

Use navigation framework

View Move between sub-displays with buttons

Custom implementation

Your Feedback is Important

Please fill out a session evaluation form

drop it off at the conference registration

desk.

Thank you!