Displays - Add Controls Components (Tutorial) teaches you to:
- Use basic controls
- Configure control properties
- Bind controls to tags
- Create control interactions
Prerequisites:
In this page:
Table of Contents maxLevel 2 minLevel 2 indent 10px exclude Steps style none
Basic Input
ControlsComponents
Open display in Draw editor.
Button:
- Drag Button from toolbox
- Properties:
- Text: "Start Motor"
- Width: 120
- Height: 40
- Click event:
csharp
@Tag.Motor1_Start = true;
Toggle Switch:
- Bind to:
@Tag.Motor1_Enable
- On Text: "Enabled"
- Off Text: "Disabled"
Numeric Input:
- Control: NumericTextBox
- Bind to:
@Tag.Setpoint
- Min: 0, Max: 100
- Format: "0.0"
Text Components
Text Display:
- Control: TextBlock
- Text:
@Tag.Temperature.ToString("F1") + " °C"
- Font Size: 24
- Update: On tag change
Progress Bar:
- Bind Value:
@Tag.Tank_Level
- Maximum: 100
- Color: Blue → Yellow → Red (by ranges)
Digital Indicator:
- Control: CheckBox (read-only)
- Bind:
@Tag.Pump_Running
- Custom text: "Running" / "Stopped"
Gauge
ControlsComponents
Circular Gauge:
- Add CircularGauge
- Configure:
- Value:
@Tag.Pressure
- Min: 0, Max: 150
- Major Ticks: 10
- Ranges:
- Green: 0-100
- Yellow: 100-120
- Red: 120-150
- Value:
Linear Gauge:
- Orientation: Vertical
- Height: 300
- Bind:
@Tag.Tank_Level
- Show scale and value
Chart
ControlsComponents
Trend Chart:
- Add TrendChart
- Configure pens:
- Pen1: Temperature (Blue)
- Pen2: Pressure (Red)
- Time span: 1 hour
- Enable zoom/pan
Bar Chart:
- Data: Production by shift
- Categories: Shift 1, 2, 3
- Values: Bind to tags
- Update: Every minute
Pie Chart:
- Data source: Query result
- Value field: "Quantity"
- Label field: "Product"
DataGrid Component
- Add DataGrid
- Configure columns:
| Batch ID | Product | Quantity | Status |
- Data source options:
- Tag array
- Query result
- Script data table
Container
ControlsComponents
Tab Control:
- Add TabControl
- Create tabs:
- Overview
- Details
- Trends
- Alarms
- Add content to each tab
Group Box:
- Title: "Motor Controls"
- Border: Solid
- Add related controls inside
Images
Image Display:
- Add Image control
- Dynamic source:
csharp
@Tag.AlarmActive ? "alarm.png" : "normal.png"
Web Browser:
- URL: Company dashboard
- Or display PDF reports
Advanced Interactions
ComboBox with Database:
csharp
// Populate from query
ComboBox1.ItemsSource = @Dataset.Query.Products.ResultData;
ComboBox1.DisplayMember = "ProductName";
ComboBox1.ValueMember = "ProductID";
Conditional Visibility:
csharp
// Show/hide based on user level
Panel1.Visibility = @Client.UserGroup == "Supervisor"
? Visibility.Visible
: Visibility.Collapsed;
Dynamic Animations
Add dynamics to any control:
- Right-click control
- Select Dynamics
- Add:
- Visibility: Show/hide by condition
- Position: Move based on value
- Size: Resize dynamically
- Color: Change by state
- Rotation: Rotate by angle
Symbols
Create reusable control sets:
- Group controls
- Right-click → Create Symbol
- Add parameters
- Save to library
- Reuse across displays
Performance Optimization
- Limit controls per display
- Use Symbols
Next Steps
- [Create Canvas Animations] - Advanced animations
- [Working with Symbols] - Reusable components
- [Create Dashboards] - Executive displays
In this section...
Page Tree | ||||
---|---|---|---|---|
|