Unplanned
Last Updated: 16 Oct 2026 13:05 by Martin Ivanov

The IsBusy property of RadBusyIndicator does not correctly reflect the value of its data-bound source when the control is unloaded and then loaded again while using a OneWay binding.

A common scenario where this occurs is when RadBusyIndicator is hosted inside a TabItem of a TabControl:

  1. IsBusy is bound (OneWay) to a ViewModel property whose value is True.
  2. The user switches to another tab, causing the RadBusyIndicator to be unloaded.
  3. During the unload process, the control internally sets its IsBusy property to False.
  4. The ViewModel property remains True.
  5. When the user navigates back to the original tab, the RadBusyIndicator is loaded again.
  6. Although the bound ViewModel property is still True, the control's IsBusy property remains False.

The binding is not re-evaluated when the control is loaded again, resulting in the control displaying a stale value that is out of sync with the bound ViewModel property.

Unplanned
Last Updated: 06 Mar 2025 09:00 by Martin Ivanov

The issue seems related to an animation timing problem in combination with the internal usage of the ObjectAnimationUsingKeyFrames class instead of BooleanAnimationUsingKeyFrames.

The exception message is: 

 

Cannot animate the 'IsEnabled' property on a 'System.Windows.Controls.ContentControl' using a 'System.Windows.Media.Animation.ObjectAnimationUsingKeyFrames'.

 

The exception stacktrace:

System.Windows.Media.Animation.AnimationException: Cannot animate the 'IsEnabled' property on a 'System.Windows.Controls.ContentControl' using a 'System.Windows.Media.Animation.ObjectAnimationUsingKeyFrames'. For details see the inner exception.
 ---> System.InvalidOperationException: The enumerator is not valid because the collection changed.
   at System.Windows.Media.VisualCollection.Enumerator.MoveNext()
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(DependencyProperty property)
   at System.Windows.UIElement.OnIsEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.CoerceValue(DependencyProperty dp)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(DependencyProperty property)
   at System.Windows.UIElement.OnIsEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.CoerceValue(DependencyProperty dp)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(DependencyProperty property)
   at System.Windows.UIElement.OnIsEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.CoerceValue(DependencyProperty dp)
   at System.Windows.FrameworkElement.InvalidateForceInheritPropertyOnChildren(DependencyProperty property)
   at System.Windows.UIElement.OnIsEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.CoerceValue(DependencyProperty dp)
   at System.Windows.UIElement.InvalidateForceInheritPropertyOnChildren(Visual v, DependencyProperty property)
   at System.Windows.UIElement.OnIsEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.CoerceValue(DependencyProperty dp)
   at System.Windows.UIElement.InvalidateForceInheritPropertyOnChildren(Visual v, DependencyProperty property)
   at System.Windows.UIElement.OnIsEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.CoerceValue(DependencyProperty dp)
   at System.Windows.UIElement.InvalidateForceInheritPropertyOnChildren(Visual v, DependencyProperty property)
   at System.Windows.UIElement.OnIsEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.Media.Animation.AnimationStorage.OnCurrentTimeInvalidated(Object sender, EventArgs args)
   --- End of inner exception stack trace ---
   at System.Windows.Media.Animation.AnimationStorage.OnCurrentTimeInvalidated(Object sender, EventArgs args)
   at System.Windows.Media.Animation.Clock.RaiseAccumulatedEvents()
   at System.Windows.Media.Animation.TimeManager.Tick()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

To work this around, you can extract the ControlTemplate of RadBusyIndicator and replace the ObjectAnimationUsingKeyFrames that animates the ContentControl.IsEnabled property with a BooleanAnimationUsingKeyFrames.

 

	<BooleanAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.001" Storyboard.TargetName="Content" Storyboard.TargetProperty="(Control.IsEnabled)">
		<DiscreteBooleanKeyFrame KeyTime="00:00:00">
			<DiscreteBooleanKeyFrame.Value>
				<sys:Boolean>False</sys:Boolean>
			</DiscreteBooleanKeyFrame.Value>
		</DiscreteBooleanKeyFrame>
	</BooleanAnimationUsingKeyFrames>

 

Unplanned
Last Updated: 03 Aug 2016 10:20 by Ivan
Created by: Ivan
Comments: 0
Category: BusyIndicator
Type: Feature Request
1
It would be great if the details of the animation weren't tied to the theme. For example, if you want the "parading dots" motif, you have to go with Windows8, Windows8Touch, or one of the "2013" themes. 

The control should have an "AnimationStyle" enumeration property, where you can select which animation you want, independent of the theme. Even better, it would be great if you could specify your own animation.

Thanks!