RecentItems 元素
使用情况
<RecentItems
CommandName = "xs:positiveInteger or xs:string"
MaxCount = "xs:nonNegativeInteger"
EnablePinning = "Boolean"/>
特性
属性 | 类型 | 必选 | 说明 |
---|---|---|---|
CommandName |
xs:positiveInteger 或 xs:string |
否 |
将 元素与 Command 相关联。 该值在功能区 XML 文档中必须是唯一的。 最大长度:100 个字符。 |
EnablePinning |
布尔 |
否 |
限制为以下值之一 (0 和 1) 无效: |
MaxCount |
xs:nonNegativeInteger |
否 |
要显示的最近项目数。 默认值为 10。 |
子元素
没有子元素。
父元素
元素 |
---|
ApplicationMenu.RecentItems |
备注
必需。
对于每个 ApplicationMenu.RecentItems 元素,必须恰好发生一次。
“ 最近使用的项目” 控件显示功能区应用程序的最近使用的 (MRU) 项列表。
示例
以下示例演示“ 最近使用的项目” 控件的基本标记。
以下示例演示 RecentItems 命令声明。
<!-- Command declaration for most recently used items. -->
<Command Name="cmdMRUItems"
Symbol="ID_FILE_MRUITEMS"
Id="25050"/>
以下示例显示关联的 RecentItems 控件声明。
<!-- Most recently used items collection. -->
<ApplicationMenu.RecentItems>
<RecentItems CommandName="cmdMRUItems"/>
</ApplicationMenu.RecentItems>
元素信息
- 支持的最低系统:Windows 7
- 可以为空:是