Click here to Skip to main content
12,821,041 members (34,290 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

9.9K views
5 bookmarked
Posted 1 Apr 2010

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

, 1 Apr 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
Anatomy of the Windows 7 taskbar – Jumplist (Part 1)

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)

Share

About the Author

rudigrobler
South Africa South Africa
No Biography provided

You may also be interested in...

Comments and Discussions

 
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170308.1 | Last Updated 1 Apr 2010
Article Copyright 2010 by rudigrobler
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid