MindFusion.Wpf Pack Programmer's Guide
Led Class
Remarks See Also
 





A LED-like control with a glow effect. This control is suitable for gauge indicators.

Namespace: MindFusion.Gauges.Wpf
Assembly: MindFusion.Gauges.Wpf

 Syntax

C#  Copy Code

public class Led : Control

Visual Basic  Copy Code

Public Class Led
    Inherits Control

 Remarks

The Led control represents a LED-like light source. The color of the light is controlled through the Background (which specifies the fill) and GlowColor (which specifies the ambience light) properties and the color of the border is specified through the BorderBrush property.

The default control template of the Indicator class uses a Led control.

Additional Led Templates

The Leds.xaml resource dictionary in the MindFusion.Gauges.Wpf.dll assembly contains some even more realistic control templates for the Led class. The two styles containing the templates are called CircularLedReflectStyle and RectangularLedReflectStyle and provide an elliptical and rectangular shaped templates respectively. The example below illustrates how to use those templates in an application.

 Example

Led control, which uses the template defined in the RectangularLedReflectStyle style. The first step is to merge the resource dictionary Leds.xaml in your application.

XAML  Copy Code

<ResourceDictionary>
  <ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="/MindFusion.Gauges.Wpf;component/Themes/Leds.xaml" />
  </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

Then you can reference the resource RectangularLedReflectStyle as you would do if it were defined in the same scope as the merged resource dictionary.

XAML  Copy Code

<gauges:Led Width="20" Height="20" Background="Red" GlowColor="Red" BorderBrush="Black" Style="{StaticResource RectangularLedReflectStyle}" />

 Inheritance Hierarchy

System.Object
    System.Windows.Threading.DispatcherObject
        System.Windows.DependencyObject
            System.Windows.Media.Visual
                System.Windows.UIElement
                    System.Windows.FrameworkElement
                        System.Windows.Controls.Control
                            MindFusion.Gauges.Wpf.Led

 See Also

Led Members
MindFusion.Gauges.Wpf Namespace