69
Windows 7 for Developers II Lynn Langit http://blogs.msdn.com/ SoCalDevGal Microsoft – Developer Evangelist

2 Win7 For Devs Ux Touch Sensors

  • Upload
    llangit

  • View
    1.932

  • Download
    2

Embed Size (px)

DESCRIPTION

TechEd Africa session on Windows 7 UX improvements, taskbar, jumplists, scenic ribbon, multi touch and sensors

Citation preview

Page 1: 2 Win7 For Devs Ux Touch Sensors

Windows 7 for Developers IILynn Langithttp://blogs.msdn.com/SoCalDevGalMicrosoft – Developer Evangelist

Page 2: 2 Win7 For Devs Ux Touch Sensors
Page 3: 2 Win7 For Devs Ux Touch Sensors
Page 4: 2 Win7 For Devs Ux Touch Sensors

Windows 95

Page 5: 2 Win7 For Devs Ux Touch Sensors
Page 6: 2 Win7 For Devs Ux Touch Sensors
Page 7: 2 Win7 For Devs Ux Touch Sensors
Page 8: 2 Win7 For Devs Ux Touch Sensors

7 Ways on Windows 7

Fundamentals

Libraries

Taskbar

Ribbon

Sensor and Location

Multi Touch

Graphics

*AppCompat*

Page 9: 2 Win7 For Devs Ux Touch Sensors

Windows 7 Taskbar in actionDemo

Page 10: 2 Win7 For Devs Ux Touch Sensors

Windows 7 TaskbarEnhanced Taskbar & Desktop Jump Lists Thumbnail Toolbars Custom SwitchersIconsOverlay IconsProgress Bars

Enhanced user experienceQuick and easy launch of applicationsEasier to manage windows The user is in controlClean and lightweightStandard Windows UX guidelines

All of Microsoft’s products

Page 11: 2 Win7 For Devs Ux Touch Sensors

Windows 7 Taskbar – Icons

Face of your programLarge and small iconsOnly customer can pinColor hot-track

Icon OverlaySurface important notificationsAppears over your program’s icon

Progress barSurface important notificationsAppears in your taskbar button

Page 12: 2 Win7 For Devs Ux Touch Sensors

IconsBest practices

Are you putting your best foot forward?Make sure your icon looks greatCheck different DPIsCheck different glass colors and disabled glass

How does Color Hot-track look?Determined by your icon’s dominant color

Page 13: 2 Win7 For Devs Ux Touch Sensors

Get More From Taskbar ButtonsOverlay and progress icons

Consolidate: Uncluttered notification areaProvide progress and additional information through the taskbar button

It’s free if you use standard progress dialogs

Page 14: 2 Win7 For Devs Ux Touch Sensors

Taskbar Overlay and ProgressDesign considerations

Notification area is now user controlled:Leave yourself out if possible!

Use taskbar buttons for custom progress or status information

Page 15: 2 Win7 For Devs Ux Touch Sensors

Peek Preview (Aero Peek)

Live peek without a click

Page 16: 2 Win7 For Devs Ux Touch Sensors

Live Thumbnails

Live thumbnails: A live previewWindows Vista: One thumbnail per windowWindows 7: Grouped thumbnails

Page 17: 2 Win7 For Devs Ux Touch Sensors

Windows 7 Taskbar – Thumbnails

Remote-control for a windowSurface key commandsAccessible from taskbar thumbnail Up to seven buttons

Page 18: 2 Win7 For Devs Ux Touch Sensors

Thumbnail ToolbarsContrasting Thumbnail Toolbar commands and user tasks

Thumbnail Toolbar Commands

Jump List User Tasks

Surface common window commands (e.g. menu items, window toolbar commands)

Define entry points intothe application

Specific to the window they’re assigned to Application-wide in scope

One set of thumbnail toolbar commands per window

One set of user tasks per application identity

Windows commands can be dynamic List of user tasks must be static

Page 19: 2 Win7 For Devs Ux Touch Sensors

Exposing Custom ThumbnailsOverriding Automatic Thumbnail Preview

To provide a custom thumbnail preview representation for a window:

Set the DWM window attribute to say you will provide an “iconic bitmap” for the windowRespond to the window messages DWM will then send in order to set the preview – done for both thumbnail- and full-sized previews

Page 20: 2 Win7 For Devs Ux Touch Sensors

Hi phone!

Page 21: 2 Win7 For Devs Ux Touch Sensors
Page 22: 2 Win7 For Devs Ux Touch Sensors
Page 23: 2 Win7 For Devs Ux Touch Sensors

Windows 7 Taskbar – Custom Switchers

Surface custom UI (e.g. TDI/MDI)Custom thumbnails for each windowAppears in your program’s window list

Page 24: 2 Win7 For Devs Ux Touch Sensors

MDI and TDI Window Switchers

What about Internet Explorer tabs?

Page 25: 2 Win7 For Devs Ux Touch Sensors

Windows API Code Pack for the .NET Library

Managed class library to access to Win 7 features

Windows Shell namespace Windows Vista and Windows 7 Task Dialogs. Support for Shell property system. Taskbar Jumplists, Icon Overlay and Progress bar. Common file dialogsSupport for Direct3D 11.0 and DXGI 1.0/1.1 APIs. Sensor Platform APIs Extended Linguistic Services APIs

http://code.msdn.com/windowsAPICodePack

Page 26: 2 Win7 For Devs Ux Touch Sensors

Windows 7 Taskbar – Jump Lists

Mini Start Menu for your programSurface key destinations and tasksCustomizableAccessible via right-click and via dragAPIs use the name “Destination List”

Page 27: 2 Win7 For Devs Ux Touch Sensors

Destinations(“nouns”)

Tasks(“verbs”)

Known categories

Custom categories

User Tasks

Taskbar Tasks

Pinned category

Windows 7 Taskbar – Jump Lists

Page 28: 2 Win7 For Devs Ux Touch Sensors

Customizing the Jump ListStep 1: Get the free stuff to work

Associate your program with the file extensionUse common file dialogsUse explicit recent document API

Page 29: 2 Win7 For Devs Ux Touch Sensors

Customizing the Jump ListStep 2: Adding tasks

What would your user like to do?Launch your application with special arguments?Launch other applications?

Tasks are IShellLink objectsRich shortcut semantics including arguments, working directory, icon, and so on.

Page 30: 2 Win7 For Devs Ux Touch Sensors

Customizing the Jump ListStep 3: Do you have categories?

Does it make sense to categorize documents?Is frequent, recent, pinned not enough?For example, Inbox, Outbox, Sales, Marketing …

Categories contain IShellItem or IShellLink objects

These are documents: You need a file association

Page 31: 2 Win7 For Devs Ux Touch Sensors

Scenic RibbonDemo

Page 32: 2 Win7 For Devs Ux Touch Sensors

Application Menu

Quick Access Toolbar

Tab Contextual Tab Set

Contextual Tab

Help

Group (aka “Chunk”)

Dialog Launcher

Windows Ribbon

In-box with Windows 7, redistribution available to VistaWin32 API & UI markup via XAML-based formatNear feature parity with Microsoft Office 2007 Ribbon & WPF Ribbon

Page 33: 2 Win7 For Devs Ux Touch Sensors

Categorized Menus

Tabs & Groups

Color Pickers

Mini Toolbar &Contextual Menu

Dropdown GalleriesTooltips

Check Boxes

Spinners

Font Control

Group Dialog Launchers

“In-Ribbon” Galleries

Combo Boxes

Buttons & Split Buttons

Windows Ribbon - Controls

Page 34: 2 Win7 For Devs Ux Touch Sensors

Scenic Ribbon API Architecture

Strong Model-View-Controller separationCode and markup decouplingSmall C++ API surface

MarkupOrganization of controls

<Ribbon> <Tab>

<Button … /> </Tab></Ribbon>

COM APIInitialization andevents handling

MyHandler::Execute(…){

DoStuff();}

Windows Scenic RibbonApplication-specific

business logic

void DoStuff() {

… …

}

Page 35: 2 Win7 For Devs Ux Touch Sensors

Integrating Windows RibbonApplicationRibbon Platform

IUIApplication

IUIFramework

CoCreateInstance

Initialize (HWND, IUIApplication*)

LoadUI( resourceName )

OnCreateCommand

IUICommandHandler

Execute, UpdateProperty

Get/SetUICommandProperty, InvalidateUICommand

Page 36: 2 Win7 For Devs Ux Touch Sensors

Microsoft’s Ribbon Strategy

MFCSceni

cWPF

Target:Managed

Target:MFC native

Target:Native

needs .NET 3.5

Win2K or newer

Vista or newer

Office 2007 & Windows styles

Office 2007 & Windows styles1

Windows visual style

Official release in late 2009

in Visual Studio 2008 SP1

Ships with Windows 7

Windows Ribbon - Roadmap

Page 37: 2 Win7 For Devs Ux Touch Sensors

Sensor & Location APINew

Page 38: 2 Win7 For Devs Ux Touch Sensors

Location devices exposed as virtual COM portsExclusive application accessNot secureProprietary data formats (NMEA, others)

GPS doesn’t work indoorsHard to support multiple technologies at once

Sensors are integrated as vertical solutionsApplications need to know sensorhardware specificsLimited adoption and scope

Limitations Of Sensors Today

Page 39: 2 Win7 For Devs Ux Touch Sensors

Sensor And Location Platform

Provides unified driver model for all types of sensor devices

Physical sensors (e.g., GPS devices, Light Sensors)Logical sensor (e.g., Wi-Fi triangulation resolver)

Provides standard APIs for accessing sensorsSensor API: C++/COM / Managed code (Windows Bridge)

Raw access to any sensor

Location API: C++/COM, Idispatch Managed code (Windows 7 API Code Pack)

Abstracted API for location data

Puts user in control of information disclosure

Page 40: 2 Win7 For Devs Ux Touch Sensors

Sensor Architecture

UMDF Sensor Driver

Sensor Class Extension

Sensor API

Application

Location and Other

Sensors Control Panel

SensorDevice

Application

UserSystem

Page 41: 2 Win7 For Devs Ux Touch Sensors

What Info Do Sensors Use?Enumerated via category and type

Category represents what is being sensedType represents how it is sensed

Properties (read-only or read-write)Data (property keys for units, data field…)Events (data-driven)State

Page 42: 2 Win7 For Devs Ux Touch Sensors

Location Platform Benefits

Single API call to answer “Where am I?”Independent of provider used todetermine locationSynchronous and Asynchronous modelsScript/automation compatible

Automatic transition between providersMost accurate providers have priority

Concurrent access for multiple applicationsDefault Location

Provided by user as fallback when no other sources are available

Page 43: 2 Win7 For Devs Ux Touch Sensors

Location Architecture

UMDF Sensor Driver

Sensor Class Extension

Sensor API

Gadget or Script Application

Location and Other

Sensors Control Panel

SensorDevice

Location APILocation IDispatch Interface

Application

UMDF Sensor Driver

Sensor Class Extension

Logical Location Sensor(Triangulation)

UserSystem

Page 44: 2 Win7 For Devs Ux Touch Sensors

Geographic Data (ILatLongReport)Latitude, longitude, altitude, associated error requiredMost common formatBest format for precise locationCan reverse geo-code later

Civic Address (ICivicAddressReport)Zip, Country requiredMost human readableBest for ‘rough’ location estimates,street directions

Types Of Location Data

Page 45: 2 Win7 For Devs Ux Touch Sensors

Location data is considered PII (user consent required)All sensors are disabled by defaultAdmin rights required to enable a sensorSensors can be configured on a per-user basis“Enable Dialog” invoked by applications

Privacy And Access Control

Page 46: 2 Win7 For Devs Ux Touch Sensors

Location Summary

C++/COM IDispatch (script, .NET interop)

Lat/Long and Address formats

Opt-in via ‘Enable Dialog’ orControl Panel

Single, convenient API for accessing current location

Enables applications to be

device-agnostic

User consent required toaccess data

Page 47: 2 Win7 For Devs Ux Touch Sensors

Sensor Demo

Demo

Page 48: 2 Win7 For Devs Ux Touch Sensors

Light-Aware Applications

UI without light-awareness,40% screen brightness

UI with light-awareness,100% screen brightness

Photos taken in direct sunlight

Page 49: 2 Win7 For Devs Ux Touch Sensors

Ambient Light SensorsMeasure light intensity (i.e., illuminance) in LUX (lumens/square meter)Includes class driver support for ACPI light sensors

Working with OEMs to integrate light sensors into notebook designs

Adaptive brightness feature supportedOS automatically adjusts display backlight

Light-aware applications can use these sensors to optimize UI content for various lighting conditions

Page 50: 2 Win7 For Devs Ux Touch Sensors

How To Build Light-Aware UIScale

Change font size/zoom level‘Weight’ of lines

ContrastColor

SaturationComplementary vs Adjacent

Smooth transitions between changes are extremely important for overall user experience

Fades or animationsData smoothing/hysteresis

Page 51: 2 Win7 For Devs Ux Touch Sensors

Sensor API Summary

C++/COM Synchronous and asynchronous

data access

Discovery via category or type

Data and properties mappedto PROPERTYKEY andPROPVARIANT pairs

Rich API for accessing raw sensor data

Direct access to individual sensors

Extensible architecture

Page 52: 2 Win7 For Devs Ux Touch Sensors

SamplesC++/COM samples in Windows SDKJScript location sample in Windows SDKWPF/.NET samples in Sensor Development Kit CDXNA + XNA Racing Game sample

ToolsLight Simulator (SDK)

HardwareGet a Sensor Development Kit

Getting Started

Page 53: 2 Win7 For Devs Ux Touch Sensors

Based on Freescale JM Badge Board (HID)Sensors

Ambient light sensor3D AccelerometerDual touch strip sensors

Developer toolsSample firmware codeSample driver codeDiagnostic and sample applications

Light-aware MSDN ReaderMarble game

Sensor Development Kit

Page 54: 2 Win7 For Devs Ux Touch Sensors

Multi Touch in Windows 7

New

Page 55: 2 Win7 For Devs Ux Touch Sensors

Multi Touch Hardware AvailabilityHP TouchSmart All-in-One PC

NextWindow digitizerDrivers: http://www.nextwindow.com/windriver/index.html

NextWindow Touch OverlayNextWindow digitizerDrivers: http://www.nextwindow.com/windriver/index.html

Dell Latitude XT or Tx2N-trig digitizerDrivers: in progress and are targeted for Beta availability.

HP TouchSmart tx2z seriesN-trig digitizerDrivers: in progress and are targeted for Beta availability.

Page 56: 2 Win7 For Devs Ux Touch Sensors

Multi Touch Is HereMT = two or more independently traceable touch pointsConsumers & MT

scored very favorably in user testingoffers clear differentiation with a high “WOW” factor for consumersenhances on-the-go use & enables new scenarios

HardwareMulti-touch capable machines in market today in a broad set of form factors

Page 57: 2 Win7 For Devs Ux Touch Sensors

Navigating and consuming the webReading & sorting emailViewing photosPlaying casual gamesConsuming music and videoNavigating files & arranging windowsUsing Office applicationsAll focused on consumption

That led to four areas of investment:Developer Platform: At the root is the touch developer platform that exposes touch APIs for any application UI Enhancements: Focusing on the core scenarios, many parts of the core UI have been optimized for touch experiences. Gestures: Multi-touch gestures have been added to enable consistent panning and zooming in most applications.Applications: A set of multi-touch focused applications that demonstrate the power of touch. These will ship separate from Win7.

Multi Touch Scenarios

Page 58: 2 Win7 For Devs Ux Touch Sensors

Control Panel – Pen and Touch

Page 59: 2 Win7 For Devs Ux Touch Sensors

Gestures and Developers Platform

Consistent Multi-touch gesturesGestures for double click, right click, single & two finger panning, two finger zoom, and two finger rotation are built into the Windows 7 platform.These gestures are available across the OS and available “for free” to most applications.

Multi-touch platformDelivered first for Win32 and COMIntegrated into next version of WPF 4.0 shipping post Windows 7Touch enabled vs. Touch optimized applications

Feature supportGesture notifications: WM_GESTUREInertia and feedback algorithms Raw data support: WM_TOUCH or RTS“Surface-style” API providing 2D manipulation and inertia support

Page 60: 2 Win7 For Devs Ux Touch Sensors

Development TiersBest

Better

Good

Page 61: 2 Win7 For Devs Ux Touch Sensors

Surface HardwareWindows 7

Surface HardwareWindows

VistaWindows 7

NativeWin32

Application

WPF 3.5

Surface SDK1.0

Managed Wrapper and

Interop

Managed Wrapper and Interop

WinForms Application

Windows 7 ReleaseNET 4.0 / Surface 2.0 Release

WPF 3.5 SP1

WPF 4.0

Surface SDK 2.0

WPF Application

Surface Application

Multi-Touch Controls

Multi-Touch API

Surface Multi-Touch Controls &

API

Multi-Touch API

Multi-Touch API and Controls

Multi Touch Development Roadmap

Page 62: 2 Win7 For Devs Ux Touch Sensors

Multi Touch in Windows 7

Demo

Page 63: 2 Win7 For Devs Ux Touch Sensors

Windows 7 Integration Library

Windows7.Multitouch.Handler is base class for Touch & Gesture handlersUse Factory to create one of the handlers

For WinFormsmanaged Win32 hWnd, & WPF gesture support handler subclass Window (hWnd)

For WPF touch support, use stylus event with help of Factory.EnableStylusEvents() method

Page 64: 2 Win7 For Devs Ux Touch Sensors

Multi Touch in WPF 4.0

UIElement and UIElement3D changesGesture events (tracking)Touch system gesture events (single)Raw touch events

Multi-touch support in controls:ScrollViewer update to accept pan gesturesBase controls updated to be multi-touch awareMulti-capture supportNew multi-touch specific controls

Compatible with Surface SDK 2.0

Page 65: 2 Win7 For Devs Ux Touch Sensors

Track ResourcesWindows 7 RC Training for Developers Windows content on Channel 9 Windows 7 Developer Center on MSDN Windows Application Compatibility Roadmap Windows 7 Blog for Developers

My blog series – http://blogs.msdn.com/SoCalDevGal #Win7DevSeriesMy MSDN show – MSDN geekSpeak My Facebook group ‘Windows 7 Developers’

Links, Video & Screencasts

Page 66: 2 Win7 For Devs Ux Touch Sensors

Related ContentBreakout Sessions WCL201 Developing for Windows 7 WCL301 Windows Application Readiness for Developers WCL302 Optimizing Your Application for the Windows 7 User Experience

Whiteboard SessionWTB215 Windows Client Development Discussion

Hands-on LabWCL08-HOL Windows 7: Mitigating Application Issues Using Shims

Page 67: 2 Win7 For Devs Ux Touch Sensors

www.microsoft.com/teched

International Content & Community

http://microsoft.com/technet

Resources for IT Professionals

http://microsoft.com/msdn

Resources for Developers

www.microsoft.com/learning

Microsoft Certification & Training Resources

Resources Tech·Ed Africa 2009 sessions will be made available for download the week after the event from: www.tech-ed.co.za

Page 68: 2 Win7 For Devs Ux Touch Sensors

Complete a session evaluation and enter to win!

10 pairs of MP3 sunglasses to be won

Page 69: 2 Win7 For Devs Ux Touch Sensors

© 2007 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.