Windows 7 For Developers

joycsc 885 views 40 slides Nov 06, 2009
Slide 1
Slide 1 of 40
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40

About This Presentation

This presentation provides some outline for developers to build cool applications by utilyzing some great features available in windows 7.


Slide Content

Windows 7 for Developers Mohammad Ashraful Alam Microsoft MVP 2007 - 2009 [ www.ashraful.net ]

Agenda

Agenda Introduction Taskbar Windows Ribbon Multitouch Sensors and Location More.. Resources and References

Common System Requirements Windows 7 Visual Studio 2008 SP1/ Visual Studio 2010 Beta 2 (or higher) Windows 7 SDK Windows API Code Pack for the .NET Framework Windows 7 Multitouch .NET Interop Sample Library

Windows7 API CodePack for .NET .NET Wrapper for Windows 7 ® features Taskbar, Libraries Sensor Location Multi-Touch UAC power management restart and recovery network awareness, Aero Glass and more.

Taskbar

Windows 7 Taskbar Taskbar Buttons Jump Lists Thumbnail Preview Thumbnail Toolbars Custom Switchers Icons Overlay Icons Progress Bars

Taskbar Buttons Quick launch User friendly Running application windows Running Not running Multiple windows Active

Destinations (“nouns”) Tasks (“verbs”) Known categories Custom categories User Tasks Taskbar Tasks Pinned category Jump Lists

Thumbnail Preview

Thumbnail Toolbars

Taskbar Overlay Surface important notifications Appears over your taskbar button

Taskbar Overlay Icons Code Snippets WinForms : TaskbarManager.SetOverlayIcon ( IntPtrwindowHandle , System.Drawing.Icon icon, string accessibilityText ) WPF: TaskbarManager.SetOverlayIcon ( System.Windows.Window window, System.Drawing.Icon icon, string accessibilityText )

Taskbar Progress bar Shows progress status Appears over your taskbar button

Taskbar Progress Bar Code Snippets WinForms : TaskbarManager.SetProgressState ( TaskbarProgressBarState state, IntPtrwindowHandle ) WPF: TaskbarManager.SetProgressState ( TaskbarProgressBarState state, System.Windows.Window window)

Windows Ribbon

Application Menu Quick Access Toolbar Tab Contextual Tab Set Contextual Tab Help Group (aka “Chunk”) Dialog Launcher In-box with Windows 7, redistribution available to Vista Win32 API, Feature parity (or close) with Microsoft Office 2007 Ribbon, and WPF Ribbon Windows Ribbon

Categorized Menus Tabs & Groups Color Pickers Mini Toolbar & Contextual Menu Dropdown Galleries Tooltips Check Boxes Spinners Font Control Group Dialog Launchers “In-Ribbon” Galleries Combo Boxes Buttons & Split Buttons Windows Ribbon - Controls

Windows Ribbon API Interfaces Consists of these main interfaces IUIFramework – initialize ribbon, load markup resource, get or set command property values or state, set application modes IUIApplication – user-implemented interface. Retrieves user command handler for each command defined in the markup. Notifies about view state changes IUICommandHandler – user-implemented interface. Handles commands, updates property value (for example, setting a command to enabled or disabled based on view)

Integrating Windows Ribbon Application Ribbon Platform IUIApplication IUIFramework CoCreateInstance Initialize (HWND, IUIApplication *) LoadUI ( resourceName ) OnCreateCommand IUICommandHandler Execute, UpdateProperty Get/ SetUICommandProperty , InvalidateUICommand

Multitouch

Multi-Touch Is Here! Hardware Multi-touch enabled hardware device Software Windows 7, .NET Framework 4.0 Consumers New scenarios, next wave of user experience, high “WOW” factor

We’ve identified several key scenarios for multi-touch: Navigating and consuming the web Reading & sorting email Viewing photos Playing casual games Consuming music and video Navigating files & arranging windows Using Office applications Multi-Touch Is Scenarios

Multi-Touch Development Tiers Good – Better – Best Windows application can target one of three levels of touch integration Good: No specific touch APIs are used but the application UI is appropriately sized and works well with the built-in gestures Better: The gesture APIs are supported to give smooth natural interactions Best: Deep touch-focused experiences designed to take advantage of multi-touch features

Good APIs For Free! Panning/zoom gestures Right-click gesture Native Win32 Controls with standard scrollbars WPF WPF 3.5 SP1 API CodePack WPF 4.0 full support + Controls WinForms Controls with standard scrollbars Best Raw touch data Manipulation and inertia processors WM_TOUCH COM-based manipulation and inertia processors Touch events Manipulation and inertia processors Manipulation and inertia processors via COM interoperability Better Gesture notifications Pan/zoom/rotate and so on WM_GESTURE message Gesture events Inertia configuration WM_GESTURE message via interoperability

Call To Action Decide the appropriate scenario that fits with concept of multi-touch feature Decide which tier of investment is appropriate Check your current applications Add Gesture Or manipulation Or inertia Build something amazing!

Sensors and Location

Few Real World Usage In a sunny day, an application might increase brightness, contrast etc An application might provide location-specific information, such as nearby restaurants An application might use a human presence sensor to change the state of the Messenger status

Sensor Platform Overview Windows 7 features a new API for working with sensors COM-based API Works with drivers using the sensor class extension You can seamlessly interact with any type of sensor, such as Ambient light sensor Temperature gauge GPS device etc

Location Platform Overview The Location API lets you obtain the location without caring about the particular mechanism used to obtain the information, for example, GPS cell-tower or Wi-Fi hotspot triangulation. The Location API automatically chooses the most accurate sensor data available.

Sensor and Location API: Benefits Hardware-independence: No need to target vendor-specific APIs or to know hardware specifics Application sharing: Multiple applications can consume data from the same sensor simultaneously

Privacy Privacy: Because Microsoft recognizes that sensor and location data are private, personally identifying information, all sensors are disabled by default.

Sensor and Location Platform Architecture – The Big Picture UMDF sensor driver Sensor class extension Sensor API Gadget or script Application Location and Other Sensors Control Panel Sensor device Location API Location IDispatch Interface Application UMDF sensor driver Sensor class extension Logical location sensor (Triangulation) User System

Sensor Wrapper Architecture Sensor is an abstract base class with a derived type for each sensor type Derived types can add properties and events

Receiving Data Reports from Sensor a3dSensor.DataUpdated += OnDataUpdated ; void OnDataUpdated ( Sensor sensor , SensorDataReport dataReport ) { Accelerometer3DReport a3dReport= ( Accelerometer3DReport ) dataReport ; Console .WriteLine ( "X: {0} Y: {1} Z: {2}" , a3dReport.AxisX_G, a3dReport.AxisY_G, a3dReport.AxisZ_G); }

More ..

More .. High DPI Version Checking Instrumentation and Performance Background Services Shell Libraries

Reference and Resources Training Materials Channel 9 Windows 7 Online Training: http://3.ly/Win7Tr Windows 7 Training Kit For Developers: http://3.ly/Win7TK Software Materials Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1: http://3.ly/win7SDK Windows® API Code Pack for Microsoft® .NET Framework: http://3.ly/Win7CP Windows 7 Multitouch .NET Interop Sample Library: http://3.ly/Win7Touch

Contact Mohammad Ashraful Alam Web: www.ashraful.net Blog: http://blog.ashraful.net Email: admin [a-t] ashraful.net Twitter: http://twitter.com/AshrafulAlam

Thank You!