Version: 1.0 | 1.1 | 2.0 |

Panel

in namespace DotVVM.Framework.Controls.Bootstrap

Renders the Bootstrap panel.

Properties

Name Type Description Notes Default Value
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
ContentTemplate ITemplate Gets or sets the contents of the main section of the panel.
attribute
inner element
static value
bindable
default
FooterTemplate ITemplate Gets or sets the contents of the footer section of the panel.
attribute
inner element
static value
bindable
default
HeaderTemplate ITemplate Gets or sets the contents of the header section of the panel.
attribute
inner element
static value
bindable
default
Type BootstrapColor Gets or sets the type of the panel.
attribute
inner element
static value
bindable
default
Default

Events

Name Type Description

Usage & Scenarios

Renders the Bootstrap panel with optional header and footer.

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

HTML Rendered by the Control

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>

Suggestions


Help & Contribute

The documentation is maintained on GitHub.
We'll be happy if you edit the page and create a pull request.

Send message