using System.Windows; using System.Windows.Controls; namespace HMI.UI { public class LightBall : ContentControl { static LightBall() { DefaultStyleKeyProperty.OverrideMetadata(typeof(LightBall), new FrameworkPropertyMetadata(typeof(LightBall))); } public static readonly DependencyProperty ValueProperty = DependencyProperty.Register( "Value", typeof(bool), typeof(LightBall), new FrameworkPropertyMetadata(false)); public static readonly DependencyProperty SizeProperty = DependencyProperty.Register( "Size", typeof(double), typeof(LightBall), new FrameworkPropertyMetadata(12d)); public double Size { get => (double)GetValue(SizeProperty); set { SetValue(SizeProperty, value); } } public bool Value { get => (bool)GetValue(ValueProperty); set { SetValue(ValueProperty, value); } } } }