次の方法で共有


Group 要素 (リボン)

最終更新日: 2015年3月9日

適用対象: SharePoint Foundation 2010

この記事の内容
属性
子要素
親要素
出現回数

コントロールのグループを定義します。

<Group
  Command="Text"
  Description="Text"
  Id="Text"
  Image32by32Popup="Url"
  Image32by32PopupClass="CSS Class Selector"
  Image32by32PopupLeft="Negative Integer"
  Image32by32PopupTop="Negative Integer"
  Sequence="Integer"
  Template="Text"
  Title="Text"
/>

属性

属性

説明

Command

オプション。値を使用して、グループ内のコントロールを有効または無効にします。Command 属性が指定され、値が設定されている場合、リボンは、ポーリングしてコマンドが無効かどうかを確認します。無効な場合、リボンは、グループ内のコントロールに関連付けられているすべてのコマンドに対してポーリングしません。コントロールもまた、事実上無効です。

Description

オプション。グループの説明。

Id

必須。グループを識別する文字列 ("Ribbon.DocLibListForm.Edit.Clipboard" など)。

Image32by32Popup

オプション。グループを表すために使用する 32 x 32 ピクセルの画像を含むファイルのサーバー相対 URL ("/_layouts/1033/images/formatmap32x32.png" など)。

Image32by32PopupClass

オプション。画像に適用される CSS クラス セレクターの名前。

Image32by32PopupLeft

オプション。画像の左端のオフセットを表す負の整数。Image32by32Popup 属性が、多くのアイコンの画像を含む画像ファイルを指定している場合に、この属性を使用します。Image32by32PopupLeft 属性の値は、HTML img タグのインライン スタイルの CSS left 属性を設定するために使用します。

Image32by32PopupTop

オプション。画像の上端のオフセットを表す負の整数。Image32by32Popup 属性が、多くのアイコンの画像を含む画像ファイルを指定している場合に、この属性を使用します。Image32by32PopupTop 属性の値は、HTML img タグのインライン スタイルの CSS top 属性を設定するために使用します。

Sequence

オプション。兄弟 XML ノード間の配置順序を指定する整数。

Template

オプション。GroupTemplate 要素の Id 属性に対応する文字列。

Title

オプション。リボンおよびヒントでグループのタイトルとして表示されるテキスト。

子要素

Controls

親要素

CommandUIDefinition

Groups

出現回数

最小: 0

最大: 制約なし

次の XML フラグメントは、2 つのボタンを含んでいるグループを定義しています。

<Group
  Id="Ribbon.WikiPageTab.CustomGroup"
  Sequence="55"
  Description="Custom Group"
  Title="Custom"
  Command="EnableCustomGroup"
  Template="Ribbon.Templates.Flexible2">
  <Controls Id="Ribbon.WikiPageTab.CustomGroup.Controls">
    <Button
      Id="Ribbon.WikiPageTab.CustomGroup.CustomGroupHello"
      Command="CustomGroupHelloWorld"
      Image16by16="/_layouts/images/FILMSTRP.GIF"
      Image32by32="/_layouts/images/PPEOPLE.GIF"
      LabelText="Hello, World"
      TemplateAlias="o2"
      Sequence="15" />
    <Button
      Id="Ribbon.WikiPageTab.CustomGroup.CustomGroupGoodbye"
      Command="CustomGroupGoodbyeWorld"
      Image16by16="/_layouts/images/FILMSTRP.GIF"
      Image32by32="/_layouts/images/PPEOPLE.GIF"
      LabelText="Good-bye, World"
      TemplateAlias="o2"
      Sequence="18" />
  </Controls>
</Group>

関連項目

タスク

[チュートリアル] グループを Server リボンに追加する