private void Focus_OnMouseLeave(object sender, MouseEventArgs e) { Cursor = null; FocusModel model = DataContext as FocusModel; if (model == null) { return; } if (model.IsWaiting) { return; } FocusGrid.ClearValue(EffectProperty); }
private void Focus_PropertyChanged(object sender, PropertyChangedEventArgs e) { FocusModel model = DataContext as FocusModel; if (model == null) { return; } if (e.PropertyName == "IsWaiting") { FocusGrid.ClearValue(EffectProperty); if (model.IsWaiting) { FocusGrid.Effect = new DropShadowEffect { Color = Colors.OrangeRed, BlurRadius = 20, Opacity = 1, ShadowDepth = 0 }; } } }