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

From Windows Forms to WinRT - Rockford Lhotka

Feb 03, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: From Windows Forms to WinRT - Rockford Lhotka

From Windows Forms to WinRT

Rockford Lhotka

Magenic

[email protected]

Page 2: From Windows Forms to WinRT - Rockford Lhotka

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

Page 3: From Windows Forms to WinRT - Rockford Lhotka

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

Page 4: From Windows Forms to WinRT - Rockford Lhotka

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

Page 5: From Windows Forms to WinRT - Rockford Lhotka

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

Page 6: From Windows Forms to WinRT - Rockford Lhotka

Window Forms

VB

C#

UI

Forms Data

DataSet Objects

Page 7: From Windows Forms to WinRT - Rockford Lhotka

WinRT

VB

C#

js

UI

XAML

HTML

Data

Objects

Page 8: From Windows Forms to WinRT - Rockford Lhotka

Primary Areas of Concern

XAML

DataSet

Data binding

Asynchronous behaviors

Sandbox environment

Application model / lifecycle

Navigation

Page 9: From Windows Forms to WinRT - Rockford Lhotka

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

Page 10: From Windows Forms to WinRT - Rockford Lhotka

DataSet

Replace with collections

ObservableCollection<T>

INotifyPropertyChanged

Page 11: From Windows Forms to WinRT - Rockford Lhotka

Data Binding

INotifyPropertyChanged

ObservableCollection<T>

INotifyDataErrorInfo

Page 12: From Windows Forms to WinRT - Rockford Lhotka

Asynchronous Behaviors

Data access

File access

Server access

More…

Page 13: From Windows Forms to WinRT - Rockford Lhotka

Sandbox Environment

Limited access to

local resources

Limited network access

Limited use of reflection

Page 14: From Windows Forms to WinRT - Rockford Lhotka

Application Lifecycle

Activation

Suspend

Deactivation

Termination

OnLaunched OnSuspended

Page 15: From Windows Forms to WinRT - Rockford Lhotka

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

Page 16: From Windows Forms to WinRT - Rockford Lhotka

Your Feedback is Important

Please fill out a session evaluation form

drop it off at the conference registration

desk.

Thank you!