This project has moved and is read-only. For the latest updates, please go here.

Can't get BusyIndicator to display at runtime, works if hardcoded in XAML

Jan 31, 2013 at 4:49 AM
I feel like this is such a simple question, but I've been trying for a while and I'm stuck. No matter what I've tried, the busy indicator just won't show up when I try to enable it at runtime.
  1. Using 1.9.0
  2. Downloaded the binaries, unblocked them, added the reference to Xceed.Wpf.Toolkit
  3. Added the namespace and following to my XAML
    <xctk:BusyIndicator x:Name="busyIndicator" IsBusy="{Binding Path=IsBusy}" BusyContent="{Binding Path=IsBusyMessage}">
        <TabControl SelectionChanged="TabControl_SelectionChanged">

A bunch of stuff...

  1. I've bound this to my ViewModel. I'm using MVVM Light.
  2. What I try to do is set the IsBusy property to true, run a bunch of code, which takes about 3 seconds to run and then set IsBusy to false.
  3. I've got tons of logging, so I know that the property is being changed to true correctly. Here is what is in the ViewModel.
        private bool _isbusy;
        /// <summary>
        /// Gets or sets a value indicating whether to display the busy indicator.
        /// </summary>
        public bool IsBusy
            get { return _isbusy; }
                _isbusy = value;

        private string _isBusyMessage;
        /// <summary>
        /// Gets or sets the message to display if busy.
        /// </summary>
        public string IsBusyMessage
            get { 
                return _isBusyMessage; 
            set { 
                _isBusyMessage = value;
But it just won't show up. Some additional points:
  • If I change the XAML and hardcode IsBusy="true", it does show. So this is purely a runtime issue.
  • I tried changing the DisplayAfter to 0 and it made no difference.
  • Originally, I actually didn't use a binding. I just set it in the code behind, no difference. Wouldn't display. I actually switched to a binding hoping it might magically fix the issue.
I'm out of ideas. Anybody?
Feb 2, 2013 at 11:28 PM
Figured it out based on this article Busy Indicator. It's obvious now, but I was trying to do the work and have the busy indicator on the same thread.