/// <summary> /// Property changed callback for LEDs /// </summary> /// <param name="d">The DependencyObject</param> /// <param name="e">The DependencyPropertyChangedEventArgs</param> private static void LedsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { LedControl c = d as LedControl; c.Leds = (List <Color>)e.NewValue; c.LoadLeds(d, null); }
/// <summary> /// Property changed callback for the active LED index /// </summary> /// <param name="d">The DependencyObject</param> /// <param name="e">The DependencyPropertyChangedEventArgs</param> private static void ActiveLedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { LedControl c = d as LedControl; c.ActiveLed = (int)e.NewValue; c.LedOff(); c.LedOn(); }