// if the mouse is over the control, this fires private static void OnRenderIsMouseOverChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) { SmartBorder border = o as SmartBorder; if (border != null) { border.InvalidateVisual(); } }
// if the button is pressed, this fires private static void OnRenderIsPressedChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) { SmartBorder border = o as SmartBorder; if (border != null) { if ((bool)e.NewValue == true) { } border.InvalidateVisual(); } }