Layout Element
Applies to: SharePoint Foundation 2010
Defines the layout of controls in a template.
<Layout
Title="Text"
LayoutTitle="Text"
/>
Attributes
Attribute |
Description |
---|---|
Title |
Required. A string that identifies the element within its parent GroupTemplate element. The element's ID in the Document Object Model (DOM) is formed on the pattern "ParentId-Title". |
LayoutTitle |
Optional. An alternative identifier for the element. Use this attribute to provide a title when the value of the Title attribute is "Popup". |
Child Elements
Parent Elements
Occurrences
Minimum: 0 Maximum: unbounded |
Example
The following example is an XML fragment that defines a group template that has several Layout elements.
<GroupTemplate Id="Ribbon.Templates.FontGroup">
<Layout Title="Large">
<Section Type="TwoRow" Alignment="Middle">
<Row>
<ControlRef TemplateAlias="font" DisplayMode="Medium" />
<ControlRef TemplateAlias="fontsize" DisplayMode="Medium" />
</Row>
<Row>
<Strip>
<ControlRef TemplateAlias="bold" DisplayMode="Small" />
<ControlRef TemplateAlias="italics" DisplayMode="Small" />
<ControlRef TemplateAlias="underline" DisplayMode="Small" />
<ControlRef TemplateAlias="strikethrough" DisplayMode="Small" />
<ControlRef TemplateAlias="subscript" DisplayMode="Small" />
<ControlRef TemplateAlias="superscript" DisplayMode="Small" />
</Strip>
<Strip>
<ControlRef TemplateAlias="backgroundcolor" DisplayMode="Small" />
<ControlRef TemplateAlias="fontcolor" DisplayMode="Small" />
</Strip>
<Strip>
<ControlRef TemplateAlias="clearformat" DisplayMode="Small" />
</Strip>
</Row>
</Section>
<OverflowSection Type="OneRow" TemplateAlias="o1" DisplayMode="Large"/>
</Layout>
<Layout Title="Medium">
<Section Type="ThreeRow">
<Row>
<ControlRef TemplateAlias="font" DisplayMode="Medium" />
<ControlRef TemplateAlias="fontsize" DisplayMode="Medium" />
</Row>
<Row>
<Strip>
<ControlRef TemplateAlias="bold" DisplayMode="Small" />
<ControlRef TemplateAlias="italics" DisplayMode="Small" />
<ControlRef TemplateAlias="underline" DisplayMode="Small" />
<ControlRef TemplateAlias="strikethrough" DisplayMode="Small" />
<ControlRef TemplateAlias="subscript" DisplayMode="Small" />
<ControlRef TemplateAlias="superscript" DisplayMode="Small" />
</Strip>
</Row>
<Row>
<Strip>
<ControlRef TemplateAlias="backgroundcolor" DisplayMode="Small" />
<ControlRef TemplateAlias="fontcolor" DisplayMode="Small" />
</Strip>
<Strip>
<ControlRef TemplateAlias="clearformat" DisplayMode="Small" />
</Strip>
</Row>
</Section>
<OverflowSection Type="ThreeRow" TemplateAlias="o1" DisplayMode="Medium"/>
</Layout>
<Layout Title="Popup" LayoutTitle="Large" />
</GroupTemplate>