private static void OnIsMouseOverRootVisualPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { if (d is UIElement uiElement) { if (GetRevealBrushMode(uiElement) == RevealBrushMode.Border) { RevealBorderBrushHelper.UpdateBrush(uiElement); } } }
private static void OnStatePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { if (d is UIElement uiElement) { var revealBrushMode = GetRevealBrushMode(uiElement); if (revealBrushMode != RevealBrushMode.None) { switch (revealBrushMode) { case RevealBrushMode.Border: RevealBorderBrushHelper.UpdateBrush(uiElement); break; case RevealBrushMode.Background: case RevealBrushMode.BackgroundPressed: RevealBackgroundBrushHelper.UpdateBrush(uiElement); break; default: break; } } } }