Windows 7 Taskbar New User Interface for Your
Windows 7 Taskbar New User Interface for Your Application Tomislav Bronzin Microsoft Regional Director & MVP CITUS Ltd. http: //www. citusgrupa. com Session Code: CLI 308
About Tomislav Bronzin Microsoft Regional Director & MVP Software Architect – CITUS Ltd. Consultant and trainer on. NET architecture and development, http: //www. citusgrupa. com METRO Trainer for Windows 7 and Unified Communication INETA Europe Vice President http: //europe. ineta. org One of the leaders of Microsoft Community in Europe Recent projects: Protect@Work, Competence Manager, Forest Management, Smarthome, Speaker: Tech. Ed Europe, Dev. Days , Dev. Reach, Win. Days, Sinergija, NT Konferenca, Vizija Contact at tomislav. bronzin@citus. hr
Agenda How the taskbar evaluated? Design considerations for the new Taskbar Managed wrappers around native APIs: Windows API Code Pack. NET 4 use WPF Best practices and UI guidelines A word about compatibility
Some Metrics The evolution was justified, but… More than 90% of sessions have fewer than 15 windows More than 70% of sessions have fewer than 10 Non-default taskbar options are used by 0 -10% of users
Design Goals For New Taskbar Single launch surface for frequent programs and destinations Easily controllable Clean, noise-free, and simple New opportunities for extensibility
Taskbar Buttons Consolidation Quick launch Notification area icon Desktop shortcut Running application windows Running Not running Active Multiple windows and hover
Taskbar Buttons Design considerations Only users can pin applications to the taskbar The icon’s hot-track color is the icon’s dominant color Test icons with high DPI Test with various themes and glass colors
demo The New Taskbar …and beyond
Windows API Code Pack for Microsoft. NET Framework Managed class library to ease. NET Framework access to Windows 7: Taskbar Jump Lists, Icon Overlay, Progress Bar, Tabbed Thumbnails, and Thumbnail Toolbars, Libraries, Known Folders, Sensor platform, etc and some Windows 7 & Vista features UAC, power management, restart and recovery, network awareness, Aero Glass and more Download it (with samples) from: http: //code. msdn. microsoft. com/Windows. APICode. Pack
Windows API Code Pack for Microsoft. NET Framework Enables access to Windows 7 Taskbar APIs from managed code Contains the Taskbar. Manager class that wraps parts of the Windows Shell API Static functions to manage Jump Lists, set Application ID, custom switching, thumbnail buttons, and more Requirements: Windows 7 RTM + SDK for Win 7 RTM. NET Framework 3. 5 SP 1
How Are Windows Grouped? Enter: Application ID It’s a string, not a GUID Limited to 128 characters Naming convention – Company. Product. Sub. Product. Version All your application components have it: Process, shortcut, window, taskbar button, document type
Application ID Heuristics of determining the Application ID can “fall back” to a larger scope if needed Process Shortcut Windows Default computation Jump List Application ID Document Type Registrations
Setting the Application ID Process-wide – affects all windows in the current process: Taskbar. Manager. Instance. Application. Id = "MS. Taskbar. Concepts. 1"; Window ID – affects only ONE window: Taskbar. Manager win. Taskbar = Taskbar. Manager. Instance; win. Taskbar. Set. Application. Id. For. Specific. Window(win. Handle, app. ID);
demo (un)Grouping Windows
Jump List It’s a mini Start menu
Jump Lists A detailed look Pinned category Destinations (“nouns”) Known categories Custom categories Tasks (“verbs”) User tasks Taskbar tasks
Jump Lists Design considerations Surface key destinations and tasks Recent and frequent are free Pinned is also free (if users use it) Respect items the user removes! Addictive: You don’t look for documents anywhere else! You also expect the common tasks to be there
Customizing the Jump List Step 1: Get the free stuff to work Associate your program with the file extension Register. File. Associations( prog. Id, register. In. HKCU, app. Id, open. With, extensions ); Use common file dialogs Common. Open. File. Dialog =. . . ; dialog. Show. Dialog(); Use explicit recent document API Jump. List jump. List = Jump. List. Create. Jump. List(); jump. List. Add. To. Recent(file. Name);
Customizing the Jump List Step 2: Adding tasks What would your user like to do? Launch your application with special arguments? Launch other applications? Tasks are IShell. Link objects Rich shortcut semantics including arguments, working directory, icon, and so on.
Customizing the Jump List Step 2: Adding tasks Jump. List jump. List; jump. List. Add. User. Tasks(new Jump. List. Link(System. IO. Path. Combine(system. Folder, "notepad. exe"), "Open Notepad"); jump. List. Add. User. Tasks(new Jump. List. Separator()); jump. List. Refresh();
demo Tasks and destinations …in a Jump List
Customizing the Jump List Step 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 IShell. Item or IShell. Link objects These are documents: You need a file association
Customizing the Jump List Step 3: Adding categories category 1 = new Jump. List. Custom. Category("Custom Category 1"); //Jump. List. Add. Custom. Categories(catego ry 1); category 1. Add. Jump. List. Items(new Jump. List. Item(path)); jump. List. Refresh();
demo Addin Custom Categories …in a Jump List
Thumbnail Toolbars Remote control from the taskbar
Thumbnail Toolbars Design considerations You get up to seven buttons Can’t add or delete; can hide and disable Tasks are not thumbnail buttons! Tasks Thumbnail Buttons Entry point Application-wide Can act dynamically Menu or toolbar Window-specific Must be static
Creating Thumbnail Toolbars private Thumbnail. Toolbar. Button button. First; button. First = new Thumbnail. Toolbar. Button (Taskbar. Concepts. Resources. first, "First Image"); button. First. Enabled = false; button. First. Click += button. First_Click; private void button. First_Click(object sender, Event. Args e) { Show. List(0); }
Get More From Taskbar Buttons Overlay and progress icons Consolidate: Uncluttered notification area Provide progress and additional information through the taskbar button It’s free if you use standard progress dialogs
Taskbar Overlay and Progress Design considerations Notification area is now user controlled: Leave yourself out if possible! Use taskbar buttons for custom progress or status information
Taskbar Overlay and Progress The APIs Taskbar. Manager win. Taskbar = Taskbar. Manager. Instance; // Icon win. Taskbar. Set. Overlay. Icon(icon, "icon 1"); // Set normal progressbar win. Taskbar. Set. Progress. Value((int)progress. Slider. Value, 100); win. Taskbar. Set. Progress. State(Taskbar. Progress. Bar. State. Normal); . . . // Remove progressbar win. Taskbar. Set. Progress. State(Taskbar. Progress. Bar. State. No. Progress);
demo Overlay & Progress Icons …in Taskbar Button
Live Thumbnails Live thumbnails: A livepreview Windows Vista®: One thumbnail per window Windows 7: Grouped thumbnails
Peek Preview (Aero Peek) Live peek without a click
Live Thumbnails and Peek Design considerations Desktop Window Manager (DWM) only talks to top-level windows Child windows need a custom representation The thumbnail might be “too much” or “not enough” What if you could … Test your thumbnails to make sure they are useful If they aren’t, customize them!
Thumbnail Clip (Zoom) Zoom into the important parts!
Customizing Live Thumbnails Tabbed. Thumbnail preview = new Tabbed. Thumbnail(Application. Current. Main. Window, image, offset); Taskbar. Manager. Instance. Tabbed. Thumbnail. Add. Thumbnail. Preview(prev iew); Taskbar. Manager. Instance. Tabbed. Thumbnail. Set. Active. Tab(preview); Customizing Peek Preview Tabbed. Thumbnail preview = Taskbar. Manager. Instance. Tabbed. Thumbnail. Get. Thumbnail. Preview(image); if (preview != null) preview. Invalidate. Preview();
Summary Quick launch is deprecated Notification area should be kept clean Proper file associations are crucial for mostrecently used or most-frequently used and custom categories Users will expect destinations and tasks Should child windows have thumbnails? Bad/Good examples: Bad: Microsoft VS 2008, Office Outlook® 2007 Good: Office Outlook 2010
question & answer
Resources www. microsoft. com/teched www. microsoft. com/learning Sessions On-Demand & Community Microsoft Certification & Training Resources http: //microsoft. com/technet http: //microsoft. com/msdn Resources for IT Professionals Resources for Developers
Related Content DEV 309 The Windows API Code Pack: How Managed Code Developers Can Easily Access Exciting New Windows Vista and Windows 7 Features CLI 09 -IS For Developers: Common Application Compatibility Issues between Windows XP, Windows Vista, and Windows 7 WCL 08 -HOL Windows 7: Mitigating Application Issues Using Shims WCL 05 -HOL Windows 7: Application Compatibility Toolkit 5. 5
Complete an evaluation on Comm. Net and enter to win an Xbox 360 Elite!
© 2009 Microsoft Corporation. All rights reserved. Microsoft, 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.
- Slides: 45