RoundPanel
RoundPanel represents a rounded-corners panel that acts as a container for other page elements.
To learn more about RoundPanel and see it in action, refer to its online demos.
#Implementation Details
RoundPanel is realized by the RoundPanelExtension class. Its instance can be accessed via the ExtensionsFactory.RoundPanel helper method, which is used to add a RoundPanel extension to a view. This method’s parameter provides access to the RoundPanel‘s settings, implemented by the RoundPanelSettings class, allowing you to fully customize the extension.
RoundPanel‘s client counterpart is represented by the MVCxClientRoundPanel object.
#Declaration
RoundPanel can be added to a view in the following manner.
View code (ASPX):
<%
Html.DevExpress().RoundPanel(
settings =>
{
settings.Name = "roundPanel";
settings.HeaderText = "Header";
settings.Width = 200;
settings.SetContent(() =>
{%>
<div>Panel content</div>
<%});
})
.Render();
%>
View code (Razor):
@Html.DevExpress().RoundPanel(
settings =>
{
settings.Name = "roundPanel";
settings.HeaderText = "Header";
settings.Width = 200;
settings.SetContent(() =>
{
ViewContext.Writer.Write("<div>some content</div>");
});
}).GetHtml()
Note
The Partial View should contain only the extension’s code.
The code result is demonstrated by the image below.