Click here to Skip to main content
Licence CPOL
First Posted 1 Apr 2010
Views 5,551
Bookmarked 3 times

Anatomy of the Windows 7 taskbar – Jumplist (Part 1)

By | 1 Apr 2010 | Technical Blog
Anatomy of the Windows 7 taskbar – Jumplist (Part 1)
A Technical Blog article. View original blog here.[^]

The last topic I want to cover about the Windows 7 taskbar is the Jumplist!!!

To create a new JumpList, call CreateJumpList():

JumpList jumplist = JumpList.CreateJumpList();

We should now choose if we are only creating user tasks or custom categories? I decided to create user tasks:

jumplist.AddUserTasks(new JumpListLink(Path.Combine
  (Environment.CurrentDirectory, "MiMail.exe"), "Mail") { Arguments = "mail" });
jumplist.AddUserTasks(new JumpListLink(Path.Combine
  (Environment.CurrentDirectory, "MiMail.exe"), "Contacts") { Arguments = "contacts" });
jumplist.AddUserTasks(new JumpListLink(Path.Combine
  (Environment.CurrentDirectory, "MiMail.exe"), "Calendar") { Arguments = "calendar" });

We could also use custom categories to group our tasks:

JumpListCustomCategory category = new JumpListCustomCategory("Mail");
category.AddJumpListItems(new JumpListLink(Path.Combine
  (Environment.CurrentDirectory, "MiMail.exe"), "Inbox") { Arguments = "inbox" });
category.AddJumpListItems(new JumpListLink(Path.Combine
  (Environment.CurrentDirectory, "MiMail.exe"), "New Message") 
  { Arguments = "newMessage" });
jumplist.AddCustomCategories(category);

Don't forget to call Refresh():

jumplist.Refresh();

Now, if you read my previous blog post and had no clue why you would want to use it? JumpList allows you to specify an application (and its arguments) to be executed if you click on a user task!!!

Cool, isn't it?

To remove all the user tasks:

jumplist.ClearAllUserTasks();

User tasks is also available if the application is pinned to the taskbar (if not removed)!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

rudigrobler



South Africa South Africa

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120517.1 | Last Updated 1 Apr 2010
Article Copyright 2010 by rudigrobler
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid