Share via


System.AppUserModel.PreventPinning

停用快捷方式或視窗釘選到工作列或 [ 開始 ] 功能表的能力。 這個屬性也會讓專案無法包含在 [ 開始 ] 功能表的 [最常使用 (MFU] 清單中) 。

這個屬性必須在視窗上設定, 才能PKEY_AppUserModel_ID 屬性。 設定PKEY_AppUserModel_ID屬性之後,會忽略 PKEY_AppUserModel_PreventPinning 的變更。

如需應用程式使用者模型識別碼的詳細資訊, (AppUserModelIDs) ,以及排除專案無法釘選到工作列和 MFU 包含的其他方法,請參閱 應用程式使用者模型識別碼 (AppUserModelIDs)

若要在視窗上設定這個屬性,請使用 SHGetPropertyStoreForWindow 來擷取視窗的屬性存放區,並使用擷取的 IPropertyStore 物件的 方法來設定該視窗的 System.AppUserModel.PreventPinning 屬性。

設定此屬性會導致忽略下列屬性:

Windows 10版本 1703、Windows 10版本 1607、Windows 10、版本 1511、Windows 10、版本 1507、Windows 8.1、Windows 8、Windows 7

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

備註

PKEY 值定義于 Propkey.h 中。

應用程式使用者模型識別碼 (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