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 rich 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 | |
---|---|---|---|---|---|
Attributes | Dictionary<String,Object> |
attribute
static value
|
null | ||
ClientIDMode | ClientIDMode | Gets or sets the client ID generation algorithm. |
attribute
static value
|
Static | |
ContentTemplate | ITemplate | Gets or sets the template for the body part 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 template for the footer part of the panel. |
inner element
static value
|
null | |
FooterText | String | Gets or sets the text of the footer part of the dialog. This property cannot be combined with the FooterTemplate property. |
attribute
static value
bindable
|
null | |
HeaderTemplate | ITemplate | Gets or sets the template for the header part of the panel. |
inner element
static value
|
null | |
HeaderText | String | Gets or sets the text of the header part of the panel. This property cannot be combined with the HeaderTemplate property. |
attribute
static value
bindable
|
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 | |
Visible | Boolean | Gets or sets whether the control is visible. |
attribute
bindable
|
True |