Panel
in namespace DotVVM.Framework.Controls.Bootstrap
Renders the Bootstrap panel.
Usage & Scenarios
Renders the Bootstrap panel with optional header and footer.
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 | |
---|---|---|---|---|---|
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. |
inner element
static value
|
null | |
ClientIDMode | ClientIDMode | Gets or sets the client ID generation algorithm. |
attribute
static value
|
1 | |
ContentTemplate | ITemplate | Gets or sets the contents of the main section of the panel. |
inner element
static value
default
|
null | |
DataContext | Object | Gets or sets a data context for the control and its children. All value and command bindings are evaluated in context of this value. |
attribute
static value
bindable
|
null | |
FooterTemplate | ITemplate | Gets or sets the contents of the footer section of the panel. |
inner element
static value
|
null | |
HeaderTemplate | ITemplate | Gets or sets the contents of the header section of the panel. |
inner element
static value
|
null | |
ID | String | Gets or sets the unique control ID. |
attribute
static value
|
null | |
InnerText | String | Gets or sets the inner text of the HTML element. |
attribute
static value
bindable
|
null | |
Type | BootstrapColor | Gets or sets the type of the panel. |
attribute
static value
|
0 | |
Visible | Boolean | Gets or sets whether the control is visible. |
attribute
bindable
|
True |