开发者

WPF app has no "Pin to Taskbar" option

开发者 https://www.devze.com 2023-01-15 02:56 出处:网络
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

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.

I am using:


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>

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


I think you need to look into this http://code.msdn.microsoft.com/Windows7Taskbar

0

精彩评论

暂无评论...
验证码 换一张
取 消