Introduction to Windows 8 Development C#/XAML Objectives Introduction to Windows 8 Operation System...

Post on 29-Mar-2015

223 views 2 download

Tags:

transcript

Introduction to Windows 8 Development C#/XAML Objectives

www.netcomlearning.com

• Introduction to Windows 8 Operation System• Windows 8 Platform• Windows Store Apps Design Guidelines• Developing a Windows Store App Using C#/XAML• Windows 8 Contracts• Q&A

Introduction to XAML

Extensible Application Markup Language is a declarative XML-based language used for initializing structured values and objects.

The acronym originally stood for Extensible Avalon Markup Language - Avalon being the code-name for Windows Presentation Foundation (WPF)

Introduction to XAML

XAML is used in for Windows 8 Metro applications.

XAML is also used extensively in .NET Framework 3.0 & .NET Framework 4.0 technologies, particularly Windows Presentation Foundation (WPF), Silverlight, Windows Workflow Foundation (WF) and Windows Runtime XAML Framework.

www.netcomlearning.com

Introduction to XAML

XAML files can be created and edited with visual design tools like Microsoft Expression Blend, Microsoft Visual Studio, and the hostable Windows Workflow Foundation visual designer.

www.netcomlearning.com

Windows Runtime XAML Framework

XAML framework is a User Interface API that is part of the Windows Runtime that forms the backbone of the new Metro-style apps in Windows 8 operating system.

www.netcomlearning.com

Introduction to Windows 8 Platform

www.netcomlearning.com

Lesson 1: Introduction to Windows 8 Operating System

• Windows 8 Platform Investments

www.netcomlearning.com

Windows 8 Platform Investments

New Windows Runtime (WinRT) APIs

New App Execution Environment

New Windows 8 User Experience

Windows Store

www.netcomlearning.com

Lesson 2: Windows 8 Platform

Windows 8 Platform

Metro Style App APIs• WinRT Language Projections

www.netcomlearning.com

Windows 8 Platform

Metro style Apps

HTML

JavaScript

C

C++

C#

VB

Desktop Apps

Win32.NET

/ SL

Internet

Explorer

Communication

& Data

Application Model

Devices &

Printing

WinRT APIs

Graphics & Media

Syst

em

Serv

ices

JavaScript

(Chakra)

C

C++

C#

VB

XAML HTML / CSSVie

wM

od

el C

on

trolle

r

Windows Core OS ServicesCore

www.netcomlearning.com

Metro Style App APIs

Fundamentals

Application Services Threading/TimersMemory

ManagementAuthentication Cryptography Globalization

DevicesGeolocation Portable Sensors NFC

User Interface

SVG Tiles Input Accessibility Printing

HTML5/CSS XAML DirectX Controls Data Binding

Communications & Data

Memory

ManagementXML Networking SMS

Notifications Streams

Contracts Local & Cloud Storage Web

MediaPlayback Capture PlayTo Visual Effects

www.netcomlearning.com

WinRT Language Projections

Windows

Runtime

Object

(or Component)

Written

in C++, C#, VBWindows

Metadata

C++ App

Pro

jectio

n

CLR

C#/VB AppP

roje

ctio

n

HTML AppCh

akra

Pro

jectio

n

www.netcomlearning.com

• Metro Style App Principles

www.netcomlearning.com

Metro Style App Principles

Metro Style App Principles

Fast and Fluid

Snap and Scale Beautifully• Contracts, Tiles, Notifications and Other

Guidelines

www.netcomlearning.com

Metro Style App Principles

www.netcomlearning.com

Fast and Fluid

Press and hold to learn

Swipe to select

Slide to dragTap for primary action

Pinch to zoom Rotate to rotate

Swipe from edge for

app and system UI

Follow the Windows 8 touch language and use only the prescribed gesture set:

See BUILD talk APP-391T: Designing Metro Style apps that are touch-optimized

www.netcomlearning.com

Snap and Scale Beautifully

People multi-task. An application can be

displayed any one of these layouts:

Widescreen (1366x768+) Snap view (required)Minimum (1024x768)

Portrait

www.netcomlearning.com

Contracts, Tiles, Notifications and Other Guidelines

Charms provide a consistent invocation model that users can always confidently rely on Share, Search and Settings

Tiles are the “front door” to your app. Treat it as an extension of your app

Toast notifications deliver transient messages outside the context of the app Show toast when your app is in the background Use it for real-time, personal content such as IM, Call, or Mail Provides quick navigation to contextually relevant location in your

app

www.netcomlearning.com

Everyday Controls

Button

Checkbox

Combo Box

Date PickerRadio Button

Hyperlink

ListBox

Ratings

Progress Bar

Progress Ring

Time Picker

Toggle Switch

Slider

www.netcomlearning.com

AppBar

Most apps will use a transient app bar Bottom app bar is for commanding

Global commands on right, contextual commands on left Can be programmatically invoked when an item is selected for

contextual commands (Ex: Demo Start) If there is a single, frequently used command, it can be placed

on canvas Menu Flyout can be used to show groups of related commands

(Ex: Demo PaintPlay)

Top app bar is for navigation in immersive views(Ex: Back button & title)

www.netcomlearning.com

Integrating with Windows 8 Experiences

www.netcomlearning.com

Module Overview

Windows 8 Contracts• Implementing the Search and Share Contracts

www.netcomlearning.com

Lesson 3: Windows 8 Contracts

The Charms Bar• Windows 8 Contracts

www.netcomlearning.com

The Charms Bar

www.netcomlearning.com

Windows 8 Contracts

• 1+1=3. Leverage other apps to complete scenarios

• Charms provide a consistent invocation model that users can always confidently rely on

• Start with the VS Item Template (available for Search, Share, File Picker extension)

www.netcomlearning.com

Lesson 4: Implementing the Search and Share Contracts

Search Anatomy

Search Settings & Events

Sharing From Source to Target• Adding Settings Flyout to Settings Charm

www.netcomlearning.com

Search Anatomy

1. Search box is scoped to the main app on screen

2. Query suggestions provided by the main app on screen• Autocompletes to terms for

which the app has search results3. List of installed Metro style apps that

have implemented the search contract4. Result suggestions provided

by the main app on screen• Must include a thumbnail and title• Indicates a strong or exact match result• Takes users directly to the details of the

result

1

2

3

www.netcomlearning.com

Search Settings & Events

Search Registration

Search Pane Events

Search Activation

Query Submitted

Suggestions Requested

Manifest Declaration

File Access Capability

Search Pane Settings

Search History (on by default)

Local Content Suggestions

Set placeholder text

www.netcomlearning.com

Sharing From Source to Target

Share Target AppShare Broker

User selects “Share”, active app

is sent event

Activated for sharing

Registers with the DataTransfer

Manager

Source App

Filters list of Target

Apps and Quicklinks

User selects Target

App or Quicklink

Processes DataPackage contents

Reports Complete

Completes Async

calls and returns

Receives event and

fills DataPackage

DataPackage lives in source application

Activate Target as kind

shareTarget

www.netcomlearning.com

Implementing Tiles and Notifications

www.netcomlearning.com

Module Overview

Using App Tiles in Windows 8 Metro Style apps• Using Notifications in Metro Style apps

www.netcomlearning.com

Lesson 5: Using App Tiles in Windows 8 Metro Style apps

App Tiles

Basic App Tiles

Live App Tiles• Secondary App Tiles

www.netcomlearning.com

App Tiles

Rich and engaging view into your app

Represent your app to the user

Alive with activity and continually updated

Draw users back into your app over and over

www.netcomlearning.com

Basic App Tiles

Square (1x1) Wide (2x1)

Both sizes can have live updates

Tap on tile to launch or switch to an app

Static default tile specified in app manifest

Two sizes:

www.netcomlearning.com

Live App Tiles

Templates provide rich rendering options

Tiles updated using pre-defined templates

Text-only, image-only or combination

JPEG or PNG only, max size 150 KB

Optional “peek” animation

Local or cloud updates

www.netcomlearning.com

Secondary App Tiles

Tiles created by “pinning” content from app

Pin initiated by app via simple runtime call

User confirms pin operation via system UI

Exposes a personalized surface for app

Same capabilities as app tiles

Launch leads to relevant content

www.netcomlearning.com

Lesson 6: Using Notifications in Metro Style apps

Toast Notifications• Toast Templates

www.netcomlearning.com

Toast NotificationsToast notifications deliver transient messages outside the context of the app

Use toast notifications to get user’s attention immediately

User is in control and can permanently turn off toast notifications from your app

Allows quick navigation to a contextually relevant location in your app

Toast notifications are easy to invoke from your app or from the cloud

www.netcomlearning.com

Toast TemplatesToast notifications use the same template architecture as Live Tiles

Rich set of rendering options available

www.netcomlearning.com

Deploying to the Windows Store

www.netcomlearning.com

Module Overview

The Windows Store• Monetizing Using the Windows Store

www.netcomlearning.com

Lesson 7: The Windows Store

• The Store

www.netcomlearning.com

The Store

Metro style app, displayed on Start

Spotlight, Recommend, Browse/Filter, Search

IE10 & Deep links

Designed for Discovery

Global reach: 200+ markets, 100+ languages

Enterprise distribution

Unprecedented reach

Free, paid, in-app, trials

3rd party in-app and advertising support

Flexible business models

Key documents published

WACK, track progress, actionable feedback

Transparent terms

Developers control pricing

Up to 80% revenue share

Best economics

www.netcomlearning.com

Lesson 8: Monetizing Using the Windows Store

Trial apps in Windows 8

In-App Purchase• Adding advertising to Windows 8 Apps

www.netcomlearning.com

Trial apps in Windows 8

Time based trials

Feature differentiated

www.netcomlearning.com

In-App Purchasevar licenceInformation = Windows.ApplicationModel.Store.CurrentApp.LicenseInformation;   // can’t do in-app purchase in trial mode, must convert first if (!licenceInformation.IsTrial)             {//load the listings with all the products var listing =  await Windows.ApplicationModel.Store.CurrentApp.LoadListingInformationAsync(); if (!licenceInformation.ProductLicenses["product1"].IsActive)                  {    try      {       // The customer doesn't own this feature, so show the purchase dialog.  await Windows.ApplicationModel.Store.CurrentApp.

RequestProductPurchaseAsync("product1");       // the in-app purchase was successful      }      catch (Exception) {// The in-app purchase was not completed because the                         // customer canceled it or an error occurred.}     }             }

www.netcomlearning.com

Adding advertising to Windows 8 Apps

3

Set Ad Unit/App IDs in your AppSubmit Ad-enabled App to StoreTrack your success at PubCenter

1

Download Ad SDKAdd few lines of code to add AdsSupport for Metro HTML/XAML

2

Sign in to PubCenterRegister your app at PubCenterGenerate App ID and Ad Unit IDs

Activate Live AdsDownload Ad SDK Publish App to Store

www.netcomlearning.com

Thank You! Back to RinchenStick around for Raffle & Q&As

www.netcomlearning.com

Upcoming Webinars

• Free Webinar: CISSP | The 10 Essential Domains Revisited

• Free Webinar: Microsoft Dynamics GP | Excel, as a GP Report Writer• Free Webinar: Microsoft Dynamics AX 2012 - The Complete ERP Solution• Free Webinar: Lync Server 2013 Part 1 | Features and Functionality• Free Webinar: Windows 8 Virtualization• Free Webinar: SharePoint 2010 Review | Courses & Certifications • Free Webinar: Windows 8 Development - HTML5 with Live Demo• Free Webinar: Microsoft SQL Server 2012 | EIM Capabilities

• Free Webinar: Lync Server 2013 Part 2 | Architecture and Deployment Changes• Free Webinar: Microsoft SQL Server 2012 | Business Intelligence & Cloud Solutions• Free Webinar: Lync Server 2013 Part 3 | Integration and Extensibility

Sign up for free at: www.netcomlearning.com/webinars

www.netcomlearning.com

Visual Studio Certifications

www.netcomlearning.com

HTML5 C#

MCSD: Windows Store Apps Using C#

www.netcomlearning.com

*Free Second Shot Exam is Back

Training Schedules for MCSD: Windows Store Apps Using C#:

• Jan 14th| New York City & Live Online (Course 20483 only)• Feb 18th| Las Vegas & Live Online (Courses 20483 + 20484)

Q & A

1-888-5-NETCOM (563-8266)

info@netcomlearning.comwww.NetComLearning.com