Loading...
Loading...
Compare original and translation side by side
@using Syncfusion.Blazor.Layouts
<SfDashboardLayout CellSpacing="@(new double[]{10, 10})" Columns="5">
<DashboardLayoutPanels>
<DashboardLayoutPanel>
<HeaderTemplate><div>Panel 1</div></HeaderTemplate>
<ContentTemplate><div>Your content here</div></ContentTemplate>
</DashboardLayoutPanel>
<DashboardLayoutPanel SizeX=2 SizeY=2 Column=1>
<HeaderTemplate><div>Panel 2</div></HeaderTemplate>
<ContentTemplate><div>Your content here</div></ContentTemplate>
</DashboardLayoutPanel>
<DashboardLayoutPanel SizeY=2 Column=3>
<HeaderTemplate><div>Panel 3</div></HeaderTemplate>
<ContentTemplate><div>Your content here</div></ContentTemplate>
</DashboardLayoutPanel>
</DashboardLayoutPanels>
</SfDashboardLayout>
<style>
.e-panel-header {
background-color: rgba(0, 0, 0, .1);
text-align: center;
}
.e-panel-content {
text-align: center;
margin-top: 10px;
}
</style>@using Syncfusion.Blazor.Layouts
<SfDashboardLayout CellSpacing="@(new double[]{10, 10})" Columns="5">
<DashboardLayoutPanels>
<DashboardLayoutPanel>
<HeaderTemplate><div>Panel 1</div></HeaderTemplate>
<ContentTemplate><div>Your content here</div></ContentTemplate>
</DashboardLayoutPanel>
<DashboardLayoutPanel SizeX=2 SizeY=2 Column=1>
<HeaderTemplate><div>Panel 2</div></HeaderTemplate>
<ContentTemplate><div>Your content here</div></ContentTemplate>
</DashboardLayoutPanel>
<DashboardLayoutPanel SizeY=2 Column=3>
<HeaderTemplate><div>Panel 3</div></HeaderTemplate>
<ContentTemplate><div>Your content here</div></ContentTemplate>
</DashboardLayoutPanel>
</DashboardLayoutPanels>
</SfDashboardLayout>
<style>
.e-panel-header {
background-color: rgba(0, 0, 0, .1);
text-align: center;
}
.e-panel-content {
text-align: center;
margin-top: 10px;
}
</style><SfDashboardLayout CellSpacing="@(new double[]{10, 10})" Columns="6">
<DashboardLayoutPanels>
<DashboardLayoutPanel SizeX=2>
<HeaderTemplate><div>Metrics</div></HeaderTemplate>
<ContentTemplate><div>250,000</div></ContentTemplate>
</DashboardLayoutPanel>
<DashboardLayoutPanel SizeX=2 Column=2>
<HeaderTemplate><div>Users</div></HeaderTemplate>
<ContentTemplate><div>45,200</div></ContentTemplate>
</DashboardLayoutPanel>
<DashboardLayoutPanel SizeX=2 Column=4>
<HeaderTemplate><div>Revenue</div></HeaderTemplate>
<ContentTemplate><div>$125,000</div></ContentTemplate>
</DashboardLayoutPanel>
</DashboardLayoutPanels>
</SfDashboardLayout><SfDashboardLayout CellSpacing="@(new double[]{10, 10})"
Columns="6"
AllowDragging="true"
AllowResizing="true">
<!-- Panel definitions -->
</SfDashboardLayout><SfDashboardLayout CellSpacing="@(new double[]{10, 10})"
Columns="5"
MediaQuery="max-width:600px">
<!-- Automatically stacks to single column below 600px -->
</SfDashboardLayout><SfDashboardLayout ID="dashboard" EnablePersistence="true" CellSpacing="@(new double[]{10, 10})">
<!-- Automatically saves to localStorage on changes -->
</SfDashboardLayout><SfDashboardLayout CellSpacing="@(new double[]{10, 10})" Columns="6">
<DashboardLayoutPanels>
<DashboardLayoutPanel SizeX=2>
<HeaderTemplate><div>Metrics</div></HeaderTemplate>
<ContentTemplate><div>250,000</div></ContentTemplate>
</DashboardLayoutPanel>
<DashboardLayoutPanel SizeX=2 Column=2>
<HeaderTemplate><div>Users</div></HeaderTemplate>
<ContentTemplate><div>45,200</div></ContentTemplate>
</DashboardLayoutPanel>
<DashboardLayoutPanel SizeX=2 Column=4>
<HeaderTemplate><div>Revenue</div></HeaderTemplate>
<ContentTemplate><div>$125,000</div></ContentTemplate>
</DashboardLayoutPanel>
</DashboardLayoutPanels>
</SfDashboardLayout><SfDashboardLayout CellSpacing="@(new double[]{10, 10})"
Columns="6"
AllowDragging="true"
AllowResizing="true">
<!-- Panel definitions -->
</SfDashboardLayout><SfDashboardLayout CellSpacing="@(new double[]{10, 10})"
Columns="5"
MediaQuery="max-width:600px">
<!-- Automatically stacks to single column below 600px -->
</SfDashboardLayout><SfDashboardLayout ID="dashboard" EnablePersistence="true" CellSpacing="@(new double[]{10, 10})">
<!-- Automatically saves to localStorage on changes -->
</SfDashboardLayout>| Property | Purpose | Common Values |
|---|---|---|
| Columns | Number of grid cells per row | 4, 5, 6, 12 |
| Row | Panel vertical position (0-based) | 0, 1, 2, ... |
| Column | Panel horizontal position (0-based) | 0, 1, 2, ... |
| SizeX | Panel width in cells | 1, 2, 3, ... |
| SizeY | Panel height in cells | 1, 2, 3, ... |
| MinSizeX/MinSizeY | Minimum size constraints | 1, 2, ... |
| MaxSizeX/MaxSizeY | Maximum size constraints | null (unlimited) or specific value |
| CellSpacing | Gap between panels (row, column) | [10, 10], [20, 20] |
| CellAspectRatio | Height-to-width ratio | 1, 2, 0.5 |
| AllowDragging | Enable panel rearrangement | true, false |
| AllowResizing | Enable panel resizing | true, false |
| AllowFloating | Auto-fill empty spaces | true, false |
| DraggableHandle | CSS selector for drag area | ".e-panel-header" |
| ResizableHandles | Resize directions | "e" (east), "south-east", etc. |
| MediaQuery | Mobile breakpoint | "max-width:600px" |
| EnablePersistence | Save state to localStorage | true, false |
| ID | Unique component ID (required for persistence) | "dashboard", "layout1" |
| 属性 | 用途 | 常见值 |
|---|---|---|
| Columns | 每行网格单元格数量 | 4, 5, 6, 12 |
| Row | 面板垂直位置(从0开始) | 0, 1, 2, ... |
| Column | 面板水平位置(从0开始) | 0, 1, 2, ... |
| SizeX | 面板宽度(单元格单位) | 1, 2, 3, ... |
| SizeY | 面板高度(单元格单位) | 1, 2, 3, ... |
| MinSizeX/MinSizeY | 最小尺寸约束 | 1, 2, ... |
| MaxSizeX/MaxSizeY | 最大尺寸约束 | null(无限制)或特定值 |
| CellSpacing | 面板间隙(行,列) | [10, 10], [20, 20] |
| CellAspectRatio | 单元格高宽比 | 1, 2, 0.5 |
| AllowDragging | 启用面板重排 | true, false |
| AllowResizing | 启用面板调整大小 | true, false |
| AllowFloating | 自动填充空白空间 | true, false |
| DraggableHandle | 拖拽区域的CSS选择器 | ".e-panel-header" |
| ResizableHandles | 调整方向 | "e"(东), "south-east"等 |
| MediaQuery | 移动端断点 | "max-width:600px" |
| EnablePersistence | 将状态保存到localStorage | true, false |
| ID | 组件唯一ID(持久化必需) | "dashboard", "layout1" |