Section & SectionColumn

The Section and SectionColumn components provide a responsive multi-column layout for organizing form fields and content. Columns are laid out horizontally and automatically wrap to the next row when the available width is constrained.

<Section>
    <SectionColumn HeaderText="Contact Info">
        <TextEdit ColumnName="firstname" />
        <TextEdit ColumnName="lastname" />
    </SectionColumn>
    <SectionColumn HeaderText="Account Info">
        <TextEdit ColumnName="name" />
    </SectionColumn>
</Section>

Columns

Place one or more SectionColumn components inside a Section. The columns distribute evenly across the available width. Use NumColumns to explicitly set the number of columns (1-4); if omitted, it defaults to the number of SectionColumn children.

<!-- Explicit 3-column layout -->
<Section NumColumns="3">
    <SectionColumn>Column 1</SectionColumn>
    <SectionColumn>Column 2</SectionColumn>
    <SectionColumn>Column 3</SectionColumn>
</Section>

Column Minimum Width

Set ColumnMinWidth on the Section to control when columns wrap to the next row. When the available width per column falls below this threshold, columns stack vertically. Defaults to 340px.

<Section ColumnMinWidth="200px">
    <SectionColumn>Narrow column 1</SectionColumn>
    <SectionColumn>Narrow column 2</SectionColumn>
    <SectionColumn>Narrow column 3</SectionColumn>
    <SectionColumn>Narrow column 4</SectionColumn>
</Section>

Headers & Footers

Both Section and SectionColumn support HeaderText/Header and FooterText/Footer parameters. Use HeaderText for simple text headings or Header for custom render fragment content.

<Section HeaderText="Account Details" FooterText="Last updated: today">
    <SectionColumn HeaderText="General">
        <TextEdit ColumnName="name" />
    </SectionColumn>
    <SectionColumn HeaderText="Address">
        <TextEdit ColumnName="address1_city" />
    </SectionColumn>
</Section>

Borders

Set BorderVisible="true" on a Section or SectionColumn to display a border around it. Borders can be set independently on the section and each column.

<Section BorderVisible="true">
    <SectionColumn BorderVisible="true">
        Bordered column
    </SectionColumn>
    <SectionColumn BorderVisible="false">
        No border on this column
    </SectionColumn>
</Section>

Content Orientation

By default, editor components inside a SectionColumn are stacked vertically. Set ColumnContentOrientation="ComponentOrientation.Horizontal" to lay them out horizontally instead. Use HorizontalGap and VerticalGap to control spacing between items.

<Section>
    <SectionColumn ColumnContentOrientation="ComponentOrientation.Horizontal"
                    HorizontalGap="20"
                    VerticalGap="10">
        <TextEdit ColumnName="firstname" />
        <TextEdit ColumnName="lastname" />
    </SectionColumn>
</Section>

Section

Here is an example that demonstrates the use of a Section component.

Example
Column 1
Column 2
Column 3
Column 4

Section (Extended Properties)

This demonstrates the most common properties that are availabe to set on the Section.

Example
Section Border Visible? Section Column Border Visible?
Column 1
Column 2
Column 3
Column 4

Section Class

Parameters

Name
Type
Default
Description
BorderVisiblebool
False
Should a border be displayed?
ChildContentRenderFragment?
Content of the section.
ChildContentStylestring?
Style to apply to the container of the child content.
ColumnMinWidthstring?
340px
Minimum width that the column should occupy.
FooterRenderFragment?
Footer to display for the section.
FooterStylestring?
Style to apply to the footer.
FooterTextstring?
Text to display as a footer. Not shown when a is supplied.
HeaderRenderFragment?
Header content to display for the section.
HeaderStylestring?
Style to apply to the header.
HeaderTextstring?
Text to display as a header. Not shown when a is supplied.
NumColumnsint?
Optionally specify the number of columns desired for the section.
The default is calculated by the actual number of 's in the child content of the component.
Name: BorderVisible
Type: bool
Default: False
Description: Should a border be displayed?
Name: ChildContent
Type: RenderFragment?
Description: Content of the section.
Name: ChildContentStyle
Type: string?
Description: Style to apply to the container of the child content.
Name: ColumnMinWidth
Type: string?
Default: 340px
Description: Minimum width that the column should occupy.
Name: Footer
Type: RenderFragment?
Description: Footer to display for the section.
Name: FooterStyle
Type: string?
Description: Style to apply to the footer.
Name: FooterText
Type: string?
Description: Text to display as a footer. Not shown when a is supplied.
Name: Header
Type: RenderFragment?
Description: Header content to display for the section.
Name: HeaderStyle
Type: string?
Description: Style to apply to the header.
Name: HeaderText
Type: string?
Description: Text to display as a header. Not shown when a is supplied.
Name: NumColumns
Type: int?
Description: Optionally specify the number of columns desired for the section.
The default is calculated by the actual number of 's in the child content of the component.

SectionColumn Class

Parameters

Name
Type
Default
Description
BorderVisiblebool
True
Is the border visible.
ChildContentRenderFragment?
Child content for the section column
ColumnContentOrientationComponentOrientation
Vertical
Orientation of the columns.
FooterRenderFragment?
Footer to display for the section.
FooterTextstring?
Text to display as a footer. Not shown when a is supplied.
HeaderRenderFragment?
Header content to display for the section.
HeaderTextstring?
Text to display as a header. Not shown when a is supplied.
HorizontalGapint?
10
Horizontal gap in pixels.
VerticalGapint?
10
Vertical gap in pixels.
Name: BorderVisible
Type: bool
Default: True
Description: Is the border visible.
Name: ChildContent
Type: RenderFragment?
Description: Child content for the section column
Name: ColumnContentOrientation
Type: ComponentOrientation
Default: Vertical
Description: Orientation of the columns.
Name: Footer
Type: RenderFragment?
Description: Footer to display for the section.
Name: FooterText
Type: string?
Description: Text to display as a footer. Not shown when a is supplied.
Name: Header
Type: RenderFragment?
Description: Header content to display for the section.
Name: HeaderText
Type: string?
Description: Text to display as a header. Not shown when a is supplied.
Name: HorizontalGap
Type: int?
Default: 10
Description: Horizontal gap in pixels.
Name: VerticalGap
Type: int?
Default: 10
Description: Vertical gap in pixels.