Led Class
Represents a led control.
public class Led : CircularGaugeBase, ILogicalParent, IVisualParent
- Inheritance:
- object Visual UIElement FrameworkElement GaugeElement GaugeBase CircularGaugeBase object
- Implements:
- ILogicalParent IVisualParent
Constructors
Led()
Initializes an instance of the class.
public Led()
Properties
BlinkInterval
The interval used when LedState is set to Blinking, or when set to Off and the IsOffDelayEnabled feature is enabled.
public Duration BlinkInterval { get; set; }
Property Value
- Duration:
The default value is
500milliseconds.
IsLedEffectEnabled
Indicates whether a special effect should be rendered for the LED.
IsOffDelayEnabled
Indicates whether a BlinkInterval delay is applied before the LED transitions from On to Off.
LedBackground
The background brush, which is used to render the LED light.
LedBorderBrush
The border brush, which is used to render the LED light.
LedBorderThickness
The border thickness, which is used to render the LED light.
LedForeground
The foreground brush, which is used to render the LED light.
LedGeometry
A custom geometry used for the LED light.
public Geometry? LedGeometry { get; set; }
Property Value
Remarks
This property is only used when LedType is set to CustomGeometry.
LedOffOpacity
The opacity of the LED light when off.
LedOnOpacity
The opacity of the LED light when on.
LedOpacity
The opacity used to render the LED light.
LedRadiusRatio
The radius of the LED light as a ratio of the Radius property.
LedState
The current state of the LED light.
LedType
The type of led light rendered.
Methods
OnCreateAutomationPeer()
Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
protected override AutomationPeer? OnCreateAutomationPeer()
Returns
- AutomationPeer:
The type-specific AutomationPeer implementation.
OnLedStateChanged(LedState, LedState)
Invoked when the LedState property is changed.
protected virtual void OnLedStateChanged(LedState oldValue, LedState newValue)
| Parameter | Type | Description |
|---|---|---|
| oldValue | LedState | The old property value. |
| newValue | LedState | The new property value. |
OnRender(DrawingContext)
When overridden in a derived class, participates in rendering operations that are directed by the layout system. The rendering instructions for this element are not used directly when this method is invoked, and are instead preserved for later asynchronous use by layout and drawing.
protected override void OnRender(DrawingContext drawingContext)
| Parameter | Type | Description |
|---|---|---|
| drawingContext | DrawingContext | The drawing instructions for a specific element. This context is provided to the layout system. |
RenderLed(DrawingContext)
Renders the LED light.
protected virtual void RenderLed(DrawingContext drawingContext)
| Parameter | Type | Description |
|---|---|---|
| drawingContext | DrawingContext | The drawing context. |
UpdateLedOpacity()
Updates the LedOpacity, usually with an animation.
protected virtual void UpdateLedOpacity()
Events
LedStateChanged
Occurs when the LedState is changed.
public event EventHandler<LedStatePropertyChangedRoutedEventArgs> LedStateChanged
Event Type
Fields
BlinkIntervalProperty
Defines the BlinkInterval property.
public static readonly DependencyProperty BlinkIntervalProperty
IsLedEffectEnabledProperty
Defines the IsLedEffectEnabled property.
public static readonly DependencyProperty IsLedEffectEnabledProperty
IsOffDelayEnabledProperty
Defines the IsOffDelayEnabled property.
public static readonly DependencyProperty IsOffDelayEnabledProperty
LedBackgroundProperty
Defines the LedBackground property.
public static readonly DependencyProperty LedBackgroundProperty
LedBorderBrushProperty
Defines the LedBorderBrush property.
public static readonly DependencyProperty LedBorderBrushProperty
LedBorderThicknessProperty
Defines the LedBorderThickness property.
public static readonly DependencyProperty LedBorderThicknessProperty
LedForegroundProperty
Defines the LedForeground property.
public static readonly DependencyProperty LedForegroundProperty
LedGeometryProperty
Defines the LedGeometry property.
public static readonly DependencyProperty LedGeometryProperty
LedOffOpacityProperty
Defines the LedOffOpacity property.
public static readonly DependencyProperty LedOffOpacityProperty
LedOnOpacityProperty
Defines the LedOnOpacity property.
public static readonly DependencyProperty LedOnOpacityProperty
LedOpacityProperty
Defines the LedOpacity property.
protected static readonly DependencyProperty LedOpacityProperty
LedRadiusRatioProperty
Defines the LedRadiusRatio property.
public static readonly DependencyProperty LedRadiusRatioProperty
LedStateChangedEvent
Defines the LedStateChanged routed event.
public static readonly RoutedEvent LedStateChangedEvent
LedStateProperty
Defines the LedState property.
public static readonly DependencyProperty LedStateProperty
LedTypeProperty
Defines the LedType property.
public static readonly DependencyProperty LedTypeProperty
Inherited Members
- CircularGaugeBase.BackgroundGeometryProperty
- CircularGaugeBase.BackgroundImageSourceProperty
- CircularGaugeBase.BackgroundRadiusRatioProperty
- CircularGaugeBase.BackgroundTypeProperty
- CircularGaugeBase.FrameTypeProperty
- CircularGaugeBase.GlassTypeProperty
- CircularGaugeBase.RadiusProperty
- CircularGaugeBase.RimGeometryProperty
- CircularGaugeBase.RimImageSourceProperty
- CircularGaugeBase.RimTypeProperty
- CircularGaugeBase.ArrangeOverride(Size)
- CircularGaugeBase.MeasureOverride(Size)
- CircularGaugeBase.GetRadius(DependencyObject)
- CircularGaugeBase.SetRadius(DependencyObject, Unit)
- CircularGaugeBase.RenderFrameBackground(DrawingContext)
- CircularGaugeBase.RenderFrameRim(DrawingContext)
- CircularGaugeBase.UpdateUnitBases()
- CircularGaugeBase.BackgroundGeometry
- CircularGaugeBase.BackgroundImageSource
- CircularGaugeBase.BackgroundRadiusRatio
- CircularGaugeBase.BackgroundType
- CircularGaugeBase.FrameType
- CircularGaugeBase.GlassType
- CircularGaugeBase.LogicalChildren
- CircularGaugeBase.Radius
- CircularGaugeBase.RimGeometry
- CircularGaugeBase.RimImageSource
- CircularGaugeBase.RimType
- GaugeBase.BackgroundProperty
- GaugeBase.IsBackgroundEffectEnabledProperty
- GaugeBase.IsRimEffectEnabledProperty
- GaugeBase.OriginProperty
- GaugeBase.RimBrushProperty
- GaugeBase.UnitBaseXProperty
- GaugeBase.UnitBaseYProperty
- GaugeBase.XProperty
- GaugeBase.YProperty
- GaugeBase.GetLocation(UIElement, Size)
- GaugeBase.OnRenderSizeChanged(SizeChangedInfo)
- GaugeBase.GetOrigin(DependencyObject)
- GaugeBase.SetOrigin(DependencyObject, CoordinateOrigin)
- GaugeBase.ToBitmap(double, double)
- GaugeBase.GetX(DependencyObject)
- GaugeBase.SetX(DependencyObject, Unit)
- GaugeBase.GetY(DependencyObject)
- GaugeBase.SetY(DependencyObject, Unit)
- GaugeBase.Background
- GaugeBase.IsBackgroundEffectEnabled
- GaugeBase.IsRimEffectEnabled
- GaugeBase.Items
- GaugeBase.Origin
- GaugeBase.RimBrush
- GaugeBase.UnitBaseX
- GaugeBase.UnitBaseY
- GaugeBase.X
- GaugeBase.Y
- GaugeElement.ZIndexProperty
- GaugeElement.GetVisualChild(int)
- GaugeElement.GetZIndex(UIElement)
- GaugeElement.SetZIndex(UIElement, int)
- GaugeElement.VisualChildren
- GaugeElement.VisualChildrenCount
- GaugeElement.ZIndex