PDC09 – Pre-Conference – Windows Bootcamp Part 4/6 – Windows 7 Taskbar

Key Goals

  • Things you use all the time are at your fingerprints
  • Manage your windows with confidence
  • You are in control
  • Clean and lightweight

Coding for the Windows Taskbar

  • Win32/C++
    • COM
      • iTaskbarList3
      • ICustomDestinationList
      • IShellItem
      • IShellLink
  • .NET

How are Windows Grouped?

  • ApplicationID
    • It’s a String, not a GUID
      • Limited to 128 characters
      • Naming Conventions – Company.Product.SubProduct
    • Design Considerations
      • Default: Computed by process name
      • Can be explicitly declared
        • Several executables, same application
        • Same executables (host), many applications
        • Multiple shortcuts
    • Setting the ApplicationID
      • Process-wide – affects all windows in the current process
      • C++
        • SetCurrentProcessExplicjtAppUserModelId(L”Microsoft.Samples.AppId1”)
      • .NET
        • TaskbarManager.SetCurrentProcessId(“Microsoft.Samples.AppId1”)

Taskbar Buttons

  • Consolidation
    • Quick launch
    • Notification area icon
    • Desktop shortcut
    • Running application Windows
  • Design Considerations
    • Only users can pin applications to taskbar
    • The icon’s hot-track color us the icon dominant color
    • Test icons with High DPI
    • Test with with various themes and glass colors
  • Get More from Taskbar Buttons
    • 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
  • Thumbnail toolbars
    • Design Considerations
      • You’ll get up to 7 buttons (hard-coded limit)
        • Once added, can’t delete
        • Can hide and disable
      • Behave as regular buttons
        • Listen to Events
    • API
      • C++
        • RegisterWindowMessage
        • ThumbBarAddButton
      • .NET
        • AddButtoons(IntPtr windowHandle, params ThumbnailToolbarButton[]) – WindowsForms
        • AddButtons(UIElement element, params ThumbnailToolbarButton[]) – WPF
  • Live Thumbnails
    • Custom Window Switchers
      • Use ITaskbarList3::RegisterTab, SetTabOrder

Taskbar + Windows Shell

  • Application Support
    • Common file dialogs
    • Known folders and libraries
    • Property System
  • Terminology
    • IShellItem – represents folders and files
    • IShellLink – represents shell shortcuts
    • IShellFolder – represents folders
  • Jump List
    • It’s a mini Start Menu for the application
      • The user is in control of what is part of the Jump List
    • Detailed Look
      • Destination (nouns) – Items that will be worked
        • Pinned Category
        • Known Category
          • Only 2 Known category exist and mutually exclusive on the API
            • Recent
            • Frequent
        • Custom Category
      • Tasks (verbs) – Actions
        • User Tasks
        • Taskbar Tasks
    • Design Considerations
      • Surface key destinations and tasks
        • Recent and frequent are free
        • Pinned is also free (if the user uses it)
        • Respect items the user removes

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy This Password *

* Type Or Paste Password Here *

2 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>