private void OnIsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e) { Debug.Assert(e.NewValue is bool, "NewValue should be a boolean!"); bool isEnabled = (bool) e.NewValue; if (MonthControl != null) { MonthControl.UpdateDisabledGrid(isEnabled); } }