This guide covers creating responsive dashboards that automatically adapt from grid layout to mobile stack view, with real-time event-driven updates.
Display Width | Layout Control | Behavior |
---|---|---|
> 400px | WPF Grid | Multi-column responsive grid |
≤ 400px | Vertical StackPanel | Single column mobile view |
The dashboard automatically switches between Grid and StackPanel based on display width, ensuring optimal layout on all devices.
Control | Designer | Runtime | Function |
---|---|---|---|
Move | ? | ? | Reorder blocks |
Delete | ? | - | Remove block |
Maximize | - | ? | Full screen view |
Resize | ? | ? | Drag gridline separators |
Container | Purpose | Behavior |
---|---|---|
Group | Keep items together | Acts as single block |
Horizontal StackPanel | Side-by-side layout | Items in row |
Vertical StackPanel | Stacked layout | Items in column |
WrapPanel | Flow layout | Wraps to next line |
Property | Default | Description |
---|---|---|
Title | - | Block header (supports tags) |
Margin | 4 | Space around block |
Padding | 0 | Space inside block |
Width/Height | Auto | Size control |
Hide on Mobile | Unchecked | Hide in stack view |
// Use curly brackets for real-time values
Title: {Tag.ProductionRate} units/hr
Title: {Client.DateTime}
Title: Line Status: {Tag.LineStatus}
.NET:
public void OnDashboardCustomizeItem(TCell item)
{
item.TitleElement.TextAlignment = TextAlignment.Center;
item.TitleElement.FontStyle = FontStyles.Italic;
item.TitleElement.FontSize = 20;
item.TitleElement.Foreground = Brushes.Black;
}
HTML5:
this.OnDashboardCustomizeItem = function(item)
{
item.TitleElement.FontSize = 18;
};
Dashboard updates are fully event-driven:
Benefits:
[Group: Production Status]
Line 1 Gauge | Line 2 Gauge | Line 3 Gauge
[Trend Chart - Full Width]
[Group: Alarms and Events]
Active Alarms Grid | Event Log
[Horizontal StackPanel: Metrics]
Revenue | Costs | Efficiency | Quality
[Group: Trends]
Production Trend | Quality Trend
[DataGrid: Detail Data]