Anatomy of the Windows 7 taskbar – Jumplist (Part 1) - Rudi Grobler
Sunday, November 22, 2009 9:16 AM rudi

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 a 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)!

Related Posts – Anatomy of the Windows 7 taskbar series

Comments

# Anatomy of the Windows 7 taskbar – Jumplist (Part 1) - Rudi Grobler

Sunday, November 22, 2009 9:46 AM by DotNetShoutout

Thank you for submitting this cool story - Trackback from DotNetShoutout

# Make your WPF buttons color hot-track!

Sunday, November 22, 2009 2:56 PM by Rudi Grobler

One of the cool new features of the Windows 7 taskbar is that all running applications gives you this

# Anatomy of the Windows 7 taskbar ??? Overlays - Rudi Grobler

Pingback from  Anatomy of the Windows 7 taskbar ??? Overlays - Rudi Grobler