Export (0) Print
Expand All

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
      isColumnSparse = true
      columnIndexType = OnDemand
      maxSize = 128
      mnemonics
   labelInfo
      label
      sortDescription
      invitationText
      hideLabel = false
   typeInfo
      type = Boolean
      groupingRange = Discrete
      isInnate = false
      canBePurged = true
      multipleValues = false
      isGroup = false
      aggregationType = Default
      isTreeProperty = false
      isViewable = false
      searchRawValue = false
      conditionType = String
      defaultOperation = Equal
   aliasInfo
      sortByAlias = None
      additionalSortByAliases = None
   displayInfo
      defaultColumnWidth = 20
      displayType
      alignment = Left
      relativeDescriptionType = General
      defaultSortDirection = Ascending
      stringFormat
         formatAs = General
      booleanFormat
         formatAs = YesNo
      numberFormat
         formatAs = General
         formatDurationAs = hh:mm:ss
      dateTimeFormat
         formatAs = General
         formatTimeAs = ShortTime
         formatDateAs = ShortDate
      enumeratedList
         defaultText
         useValueForDefault = False
         enum
            value
            text
            mnemonics
            image
         enumRange
            minValue
            setValue
            text
            mnemonics
            image
      drawControl
         control = Default
      editControl
         control = Default
      filterControl
         control = Default
      queryControl
         control = Default
   relatedPropertyInfo
      relatedProperty
         relationshipName
         propertyName

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

 

 

Community Additions

ADD
Show:
© 2014 Microsoft