System.AppUserModel.PreventPinning

Disables the ability of a shortcut or window to be pinned to the taskbar or the Start menu. This property also makes the item ineligible for inclusion in the Start menu's Most Frequently Used (MFU) list.

This property must be set on a window before the PKEY_AppUserModel_ID property. After the PKEY_AppUserModel_ID property is set, changes to PKEY_AppUserModel_PreventPinning are ignored.

For more information about Application User Model IDs (AppUserModelIDs) and other methods of excluding an item from being pinned to the taskbar and from MFU inclusion, see Application User Model IDs (AppUserModelIDs).

To set this property on a window, use SHGetPropertyStoreForWindow to retrieve the window's property store, and use the methods of that retrieved IPropertyStore object to set the System.AppUserModel.PreventPinning property of that window.

Setting this property causes the following properties to be ignored:

propertyDescription
   name = System.AppUserModel.PreventPinning
   shellPKey = PKEY_AppUserModel_PreventPinning
   formatID = 9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3
   propID = 9
   SearchInfo
      InInvertedIndex = false
      IsColumn = false
   SearchInfo
      InInvertedIndex = false
      IsColumn = false
   typeInfo
      type = Boolean
      IsInnate = false

Remarks

PKEY values are defined in Propkey.h.

Related topics

Application User Model IDs (AppUserModelIDs)
System.AppUserModel.ID
SHGetPropertyStoreForWindow
propertyDescriptionList
propertyDescription
searchInfo
labelInfo
typeInfo
displayInfo
aliasInfo
stringFormat
booleanFormat
numberFormat
dateTimeFormat
enumeratedList
enum
enumRange
image
drawControl
editControl
filterControl
queryControl
relatedPropertyInfo
relatedProperty

 

 

Show: