A LED-like control with a glow effect. This control is suitable for gauge indicators.
Namespace: MindFusion.Gauges.Wpf
Assembly: MindFusion.Gauges.Wpf
C# Copy Code |
---|
public class Led : Control |
Visual Basic Copy Code |
---|
Public Class Led |
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.
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.
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> |
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}" /> |
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