Panel

in namespace DotVVM.Framework.Controls.Bootstrap

Renders the Bootstrap panel.

Usage & Scenarios

Renders the Bootstrap panel with optional header and footer.

https://getbootstrap.com/docs/3.3/components/#panels

Sample 1: Basic Panel

The contents of the panel can be defined using the ContentTemplate property, or by specifying the content just inside the <bs:Panel> control.

You can change the contextual color of the Panel using the Type property.

<bs:Panel Type="Danger">
  <ContentTemplate>
    This is panel body.
  </ContentTemplate>
</bs:Panel>

<bs:Panel Type="Default">
    This is panel body.
</bs:Panel>

Sample 2: Panel Templates

The Header part of the Panel can be customized using the HeaderTemplate property.

Similarly, the FooterTemplate property allows to customize the footer of the panel.

If you need to add additional content which should have zero padding, like a ListGroup or Table, use the AdditionalContentTemplate property.

<bs:Panel Type="Primary">
  <HeaderTemplate>
    My Panel
  </HeaderTemplate>
  <ContentTemplate>
    This is panel body.
  </ContentTemplate>
  <FooterTemplate>
    Footer template
  </FooterTemplate>
  <AdditionalContentTemplate>
    <table class="table">
      <tr>
        <td>Test</td>
        <td>Test</td>
      </tr>
      <tr>
        <td>Test</td>
        <td>Test</td>
      </tr>
    </table>
  </AdditionalContentTemplate>
</bs:Panel>

Properties

Name Type Description Notes Default Value
property icon AdditionalContentTemplate ITemplate Gets or sets the contents of the additional content section of the panel. The additional content section has no padding and is intended to place ListGroups or similar controls inside.
attribute
inner element
static value
bindable
default
null
property icon ContentTemplate ITemplate Gets or sets the contents of the main section of the panel.
attribute
inner element
static value
bindable
default
null
property icon FooterTemplate ITemplate Gets or sets the contents of the footer section of the panel.
attribute
inner element
static value
bindable
default
null
property icon HeaderTemplate ITemplate Gets or sets the contents of the header section of the panel.
attribute
inner element
static value
bindable
default
null
property icon Type BootstrapColor Gets or sets the type of the panel.
attribute
inner element
static value
bindable
default
Default

HTML produced by the control