Panel

in namespace DotVVM.BusinessPack.Controls

Renders a panel.

Usage & Scenarios

Renders a box with header, main content and footer.

Sample 1: Basic Usage

The content inside the <bp:Panel> element is treated as a ContentTemplate property which specifies the main content of the panel.

The HeaderText can be used to specify the text in the panel header. Alternatively, you can use the HeaderTemplate property to be able to use any HTML content inside the header.

The same applies to the FooterText and FooterTemplate properties which can be used to customize the panel footer row.

<%-- Simple text header and footer --%>
<bp:Panel HeaderText="This is Header"
          FooterText="This is Footer">
    <ContentTemplate>
        This is content
    </ContentTemplate>
</bp:Panel>

<br />

<%-- Templated header and footer --%>
<bp:Panel>
    <HeaderTemplate>
        <h3>This is Header</h3>
    </HeaderTemplate>
    <ContentTemplate>
        This is content
    </ContentTemplate>
    <FooterTemplate>
        <i>This is footer</i>
    </FooterTemplate>
</bp:Panel>

Properties

Name Type Description Notes Default Value
property icon ContentTemplate ITemplate Gets or sets the template for the body part of the panel.
attribute
inner element
static value
bindable
default
null
property icon FooterTemplate ITemplate Gets or sets the template for the footer part of the panel.
attribute
inner element
static value
bindable
default
null
property icon FooterText String Gets or sets the text of the footer part of the dialog. This property cannot be combined with the FooterTemplate property.
attribute
inner element
static value
bindable
default
null
property icon HeaderTemplate ITemplate Gets or sets the template for the header part of the panel.
attribute
inner element
static value
bindable
default
null
property icon HeaderText String Gets or sets the text of the header part of the panel. This property cannot be combined with the HeaderTemplate property.
attribute
inner element
static value
bindable
default
null

HTML produced by the control