WPF 4 Development Windows 7 Jump List (jumplist)

Source: Internet
Author: User
Tags new features xmlns visual studio visual studio 2010

In the Windows 7 taskbar development series previously written, we developed the application's taskbar with Visual Studio 2008 with Microsoft's Windows API Code Pack, and the upcoming Visual Studio 2010 provides us A more convenient way to develop, the new version of WPF 4 requires only XAML code to implement the features of the Windows 7 taskbar. This article will introduce the jumplist (Jump List) and experience the new features of the. NET Framework 4.0.

Writing JumpList in XAML

The handy thing about developing the taskbar in WPF 4 is that you can use XAML to write the appropriate functional code directly without using the API to write cumbersome C # programs. First open the App.xaml file to join the JumpList program we want, where the JumpList class provides a way to create a Jump List, Jumptask class can create a link in the list. By comparing the jumplist written by the API, it is obvious that the XAML approach is much simpler and clearer.

<application x:class= "Win7taskbardemo.app"
xmlns= http://schemas.microsoft.com/winfx/2006/xaml/ Presentation "
xmlns:x=" Http://schemas.microsoft.com/winfx/2006/xaml "
startupuri=" MainWindow.xaml "& Gt     
<application.resources>

</application.resources>
<jumplist.jumplist>
<jumplist showfrequentcategory= "true"
Showrecentcategory= "true"
<jumptask Applicationp             Ath= "notepad.exe"
customcategory= "Microsoft Tools"
description= "Start notepad"
       Title= "Notepad"
iconresourcepath= "notepad.exe"
iconresourceindex= "0"/>

<jumptask applicationpath= "MSPaint.exe"
customcategory= "Microsoft Tools"
Descript ion= "Start Paint"
title= "Paint"
iconresourcepath= "MSPaint.exe"
Iconresourc eindex= "0"/>

<jumptask applicationpath= "http://gnielee.cnblogs.com/"
customcategory= "Blog Link"
Description= "Go" {Gnietech} "
title=" Gnie ' s Blog
iconresourcepath= "C:\\Program File S\\internet Explorer\\iexplore.exe "/>
</jumplist>
</jumplist.jumplist>
</Applicati On>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.