Displays - Add Animations (Tutorial) teaches you to:
Prerequisites:
Basic Shapes:
Combine Shapes:
Build tank with level animation:
csharp
@Tag.Tank_Level * TankHeight / 100
Create rotating equipment:
Pump Impeller:
csharp
@Tag.Pump_Running ? @Tag.AnimationAngle : 0
csharp
@Tag.AnimationAngle = (@Tag.AnimationAngle + 5) % 360;
Dynamic color changes:
State-based Color:
csharp
// Pipe color by material
Fill = @Tag.Material == "Water" ? "Blue" :
@Tag.Material == "Oil" ? "Brown" :
@Tag.Material == "Gas" ? "LightGray" : "White"
Gradient Animation:
Show/hide elements:
Blinking Alarm:
csharp
Visibility = @Tag.Alarm && @Tag.BlinkState ?
Visibility.Visible : Visibility.Hidden
Toggle blink state every 500ms
Progressive Disclosure:
Scale Animation:
csharp
// Pulse effect for alarms
ScaleX = @Tag.Alarm ? 1.0 + (Math.Sin(@Tag.PulseAngle) * 0.1) : 1.0
ScaleY = ScaleX
Translation:
Build multi-part animation:
Conveyor Belt:
Centrifuge:
Add user interaction:
Click Actions:
csharp
void OnValveClick()
{
if (@Tag.Mode == "Manual")
{
@Tag.Valve_Position = @Tag.Valve_Position > 50 ? 0 : 100;
}
}
Drag to Adjust:
Optimize Animations:
Best Practices:
Particle Effects:
csharp
// Bubbles in tank
for(int i = 0; i < 10; i++)
{
CreateBubble(
RandomX(),
TankBottom,
RandomSize(),
RandomSpeed()
);
}
3D-like Effects: