WPF应用程序没有"固定到任务栏"选项 [英] WPF app has no "Pin to Taskbar" option

查看:283
本文介绍了WPF应用程序没有"固定到任务栏"选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了几个WPF应用程序,但是当右击它们在Windows 7任务栏我只是得到一个关闭的Windows选项,通常有一个固定到任务栏选项,我不知道这已经是有。任何需要启用或任何

I have created a couple of WPF apps but when right clicking them in the Windows 7 Taskbar I just get a Close Windows Option, usually there is a Pin to Taskbar option, I don't know where this has gone, is there anything that needs to be enabled or anything.

我使用的:


  • VS2010 +混合4的.NET Framework 3.5SP1

推荐答案

您的WPF应用程序快捷方式要求一个AppUserModelID。这是可以在任何的.lnk快捷方式被设置的性质。一旦视窗知道AppUserModelID它提供了任务栏的新功能,应用程序,包括任务栏图标glomming这组相同的应用程序的几个打开的窗口一起。如果您使用MSI安装您的应用程序可以使用的 MsiShortcutProperty 的表,并设置的 AppIDProperty 的为你的应用程序的快捷方式。该值采用以下形式:

Your shortcut for the WPF Application requires an AppUserModelID. This is a property that can be set on any .lnk shortcut. Once Windows knows the AppUserModelID it provides the new features of the Taskbar to the app, including taskbar icon glomming which groups several open windows of the same app together. If you use MSI to install your apps you can use the MsiShortcutProperty table and set AppIDProperty for your app's shortcut. The value takes the following form:

For your MsiShortcutProperty table, add the following values to the table:

Columns/values:
MsiShortcutProperty/AppIDProperty
Shortcut_/MyShortcut.<guid>
PropertyKey/System.AppUserModel.ID
PropVariantValue/<YourCompanyName.ProductName.SubProduct.VersionInformation>

您也可以看看下面的文章,其中介绍了如何标识使用,并可以在设置快捷键编程: http://msdn.microsoft。 COM / EN-US /库/ dd378459%28VS.85%29.aspx#其中

You can also look at the following article which explains how the ID is used and can be set on a shortcut programmatically: http://msdn.microsoft.com/en-us/library/dd378459%28VS.85%29.aspx#where

这篇关于WPF应用程序没有&QUOT;固定到任务栏&QUOT;选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆