Presentation is loading. Please wait.

Presentation is loading. Please wait.

Windows 7 – A developer’s Guide to Building Killer Windows 7 Applications Bijoy Singhal │ Developer Evangelist, Microsoft India.

Similar presentations


Presentation on theme: "Windows 7 – A developer’s Guide to Building Killer Windows 7 Applications Bijoy Singhal │ Developer Evangelist, Microsoft India."— Presentation transcript:

1 Windows 7 – A developer’s Guide to Building Killer Windows 7 Applications Bijoy Singhal │ Developer Evangelist, Microsoft India

2 Agenda Windows 7 Developer Overview Introducing the Windows API Code Pack A Lap around Windows 7 “goodness” Easy ways to “light up” your application Taskbar buttons Thumbnail toolbars Overlays and Progress Custom Thumbnails JumpLists Other Light Up scenarios

3 Windows 7 Developer OverView Lots of new features for development Aero, Taskbar & Desktop Libraries Sensors Multi-Touch DirectX including DirectWrite and Direct2D App Restart & Recovery And much, much more…

4 The Windows API Code Pack for.NET Windows Platform SDK – for native code Windows API Code Pack – for managed code – Gives access to most of the features in Win7 – Full source code available – Current version: 1.1 – All features degrade gracefully on older Windows – Tons of samples in the package – Get it @ http://code.msdn.microsoft.com/WindowsAPICodePack http://code.msdn.microsoft.com/WindowsAPICodePack

5 Windows API Code Pack Structure Consists of a number of projects for different items – Core: Consists of core services like network, power, app recovery service, property system etc. – Shell: Works with the UI – aero, taskbar, controls, common dialogs and more… – DirectX: allows.NET apps to use D2D, D3D & DW – Sensors: to use light, motion and position Lighting up apps is very easy with Core & Shell

6 Windows 7 UI Design Goals Clean, noise-free & simple Single launch surface for most used apps and files Get to information faster without needing to “switch” to application User has control on apps, desktop, icons

7 “Light Up” Features for Free! Apps running on Win7 get some light up features for free – Aero Peek – Aero Snap – Aero Shake – Taskbar Fixed Positioning – Mouse Hot Tracking

8 Demo Aero Peek Aero Snap Aero Shake Taskbar Positioning Mouse Hot Tracking

9 Light Up Feature I: Aero Glass Add Aero Glass forms to your app Detect availability of Aero Option to turn off Aero as well WACP Code public partial class Form1 : GlassForm

10 Demo Making a WinForm Glassy

11 Light Up Feature II: Application ID Configures application taskbar button grouping Default is program name Scenarios to customize – Single app, multiple icon – Multiple apps, single icon WACP Code TaskbarManager Taskbar = TaskbarManager.Instance; Taskbar.ApplicationId = “MyAppName”;

12 Demo Application ID TaskBar Button Grouping

13 Light Up Feature III: Overlay Icons Add icon overlay to application icon Use to display “state” of application Makes icon the place to view WACP Code TaskbarManager Taskbar = TaskbarManager.Instance; Taskbar.SetOverlayIcon(SystemIcons.Asterisk, “My Status");

14 Demo Overlay Icons

15 Light Up Feature IV: Taskbar Progress Show progress bars in application icon Multiple progress states to show running status Can only show one progress bar at a time WACP Code TaskbarManager Taskbar = TaskbarManager.Instance; Taskbar.SetProgressState(TaskbarProgressBarState.Normal); Taskbar.SetProgressValue(CurrentValue, MaximumValue);

16 Demo Taskbar Progress

17 Light Up Feature V: Thumbnail Toolbars Allow interacting with application from thumbnail Add up to 7 buttons in thumbnail Cannot remove buttons, but can hide WACP Code ThumbnailToolbarButton btn = new ThumbnailToolbarButton(Icon, “Tooltip”); btn.Click += new EventHandler (btn_Click); Taskbar.ThumbnailToolbars.AddButtons(this.Handle, btn);

18 Demo Thumbnail Toolbars

19 Light Up Feature VI: Thumbnails Clipping Sometimes the default thumbnail is not good enough Display the most important part of the window Can reset back to full window WACP Code Taskbar.TabbedThumbnail.SetThumbnailClip(WindowHandle, Rectangle);

20 Demo Thumbnail Customizing with Clipping

21 Light Up Feature VII: Jump Lists Mini Start menu for each application Consists of: – Categories – Tasks – Destinations – Recent, Frequent & Pinned items Registered extensions are automatically handled WACP Code – next slide

22 Jump Lists WACP Code // Declare and instantiate JumpList jl; jl = JumpList.CreateJumpList(); // Show from Recent, Frequent or None. (Pinned is auto) jl.KnownCategoryToDisplay = JumpListKnownCategoryType.Recent; // Add task jl.AddUserTasks(new JumpListLink(Path), “My Task"){Icon} jl.AddUserTasks(new JumpListSeparator()); // Add category JumpListCustomCategory c1 = new JumpListCustomCategory("Documents"); jl.AddCustomCategories(c1); // Add Destination c1.AddJumpListItems(new JumpListItem(PathToFile)); // Refresh jl.Refresh();

23 Demo Jump Lists Tasks Categories Destinations Known Types Recent Frequent Pinned

24 Light Up Feature VIII: Sensors Many different types of sensors in Windows 7 – Light – Accelerometer – Location WACP Code (sample) SensorList sl = SensorManager.GetSensorsByTypeId ( ); SensorManager.SensorsChanged += new SensorsChangedEventHandler(S_Changed);

25 Demo Working with Sensors WACP Sample – Accelerometer WACP Sample - AmbientLight

26 Summary Windows 7 is a developer’s delight Tons of new stuff that you can add to your apps The Windows API Code Pack lets you get these features in.NET apps very easily The easiest way to get your app to light up on Windows 7 is to use the Taskbar and UI features

27 bsinghal@microsoft.com

28 © 2008 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.


Download ppt "Windows 7 – A developer’s Guide to Building Killer Windows 7 Applications Bijoy Singhal │ Developer Evangelist, Microsoft India."

Similar presentations


Ads by Google