introduction to building windows 8 apps using xaml

22
Introduction to building Windows 8 apps using XAML Chris Anderson and Bede Jordan 3-116

Upload: marek

Post on 06-Feb-2016

85 views

Category:

Documents


0 download

DESCRIPTION

Introduction to building Windows 8 apps using XAML. Chris Anderson and Bede Jordan 3-116. Deliver native Windows 8 apps using what you already know today!. Familiar to Phone, Silverlight, and WPF developers Use C#, Visual Basic, or C++ Built directly on DirectX for world-class performance. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Introduction to building Windows 8 apps using XAML

Introduction to building Windows 8 apps using XAML

Chris Anderson and Bede Jordan3-116

Page 2: Introduction to building Windows 8 apps using XAML

Familiar to Phone, Silverlight, and WPF developers

Use C#, Visual Basic, or C++

Built directly on DirectX for world-class performance

Deliver native Windows 8 apps using what you already know today!

Page 3: Introduction to building Windows 8 apps using XAML

Hello XAML C++…

Page 4: Introduction to building Windows 8 apps using XAML

XAML Architecture

Complete native implementation built on top of DirectX

Windows 8 Subsystem

Windows 8 app (C++, C#, or VB)

AppTheming

& PVLDirect3D

DirectWrite

Direct2DMedia Touch

XAML Platform

WinRT/C++ Projection

XAML Graphic Engine

XAML Core and Framework (Parser, Controls, Property Engine, Styles, Animation etc.)

XAML ABI support

C++

Page 5: Introduction to building Windows 8 apps using XAML

XAML framework threading model

Multi-threaded architecture to take advantage of multiple cores

UI thread

Multiple worker threads for image decoding

• Application code runs here• Events are fired here• Framework code: controls, parsing,

layout, input processing, text, shapes, etc.

Compositor thread

• Running Independent Animations• Processing Independent Input for

XAML ScrollViewer element (enables smooth panning and zooming)

• Compositing the Scene with Direct3D

Page 6: Introduction to building Windows 8 apps using XAML

<Page

x:Class="XAMLYouLove.MainPage"

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

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

<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">

<Button Click="Button_Click_1" Content="Hello World" />

</Grid>

</Page>

Evolution of WPF and Silverlight XAML notation

Many type definition features removed (x:SubClass, etc.)

Type system moved to WinRT (clr-namespace: becomes using:, etc)

Object model changes (Names changed, type converters removed, etc.)

XAML declarative notation

Windows 8 XAML is very familiar to WPF, Phone, and Silverlight developers, but there are differences…

Page 7: Introduction to building Windows 8 apps using XAML

The XAML you know and love…

Page 8: Introduction to building Windows 8 apps using XAML

Basic intrinsic controlsButton, CheckBox, ComboBox, Image, RadioButton, TextBlock, TextBox, ProgressBar, RichEditBox, ToolTip, WebView, etc.

Personality controlsGridView, ListView, FlipView, AppBar, SemanticZoom, ToggleButton, etc.

Core controls to build a Windows Store app

Controls

Page 9: Introduction to building Windows 8 apps using XAML

Creating custom controls enables you to extend the capabilities of the platformIf you are writing controls designed to be used by many apps, write them in C++If you are writing controls to be used by a single app, use whatever language blends best with the app (C#, VB, or C++)

One of the key benefits of XAML is extending the control set…

Creating new controls

Page 10: Introduction to building Windows 8 apps using XAML

Creating a custom control…

Page 11: Introduction to building Windows 8 apps using XAML

Pointer represents mouse, touch, and penImportant to remember that you may have multiple contacts (touch and pen) and that there may be high resolution data (primarily pen)

Keyboard supports standard and touch keyboard, however in general, you should use built in text input controls to get full IME and accessibility support

Windows Store apps should support mouse, touch, keyboard, and ideally pen as first class input

Input

Page 12: Introduction to building Windows 8 apps using XAML

Multi-touch paint…

Page 13: Introduction to building Windows 8 apps using XAML

PersonalityContractsStore

Building a great Windows 8 app experience means integrating…

Windows 8 apps

Page 14: Introduction to building Windows 8 apps using XAML

Windows 8 personality…

Page 15: Introduction to building Windows 8 apps using XAML

Search contract…

Page 16: Introduction to building Windows 8 apps using XAML

Trial mode…

Page 17: Introduction to building Windows 8 apps using XAML

SurfaceImageSource and VirtualSurfaceImageSource are derived from ImageSource, and enable rich DX content that is relatively static, like image filtering and editing, custom document (for example, CAD) scenarios

SwapChainBackgroundPanel allows an app to create a full screen IDXGISwapChain in their XAML app, and composite XAML controls and content on top of it, enabling game scenarios

XAML offers integration of DirectX content through two primary mechanisms

DirectX and XAML integration

Page 18: Introduction to building Windows 8 apps using XAML

Integrating DirectX content…

Page 19: Introduction to building Windows 8 apps using XAML

• 10/31 @ 5:15 – B33 KodiakPerformance tips for Windows Store apps using XAML

• 11/1 @ 8:30 – B33 CascadeBuilding world-ready Windows Store apps with XAML

• 11/1 @ 10:15 – B33 HoodXAML list controls

• 11/1 @ 4:15pm – B33 KodiakAnalytics for Windows Store apps

Related sessions

Please submit session evals on the Build Windows 8 App or at http://aka.ms/BuildSessions

Page 20: Introduction to building Windows 8 apps using XAML

Use XAML with C++, C#, or VB to create native Windows 8 apps!

Page 22: Introduction to building Windows 8 apps using XAML

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.