Xceed.Wpf.Toolkit.BusyIndicator.OnIsBusyChanged C# (CSharp) Method

OnIsBusyChanged() protected method

IsBusyProperty property changed handler.
protected OnIsBusyChanged ( System.Windows.DependencyPropertyChangedEventArgs e ) : void
e System.Windows.DependencyPropertyChangedEventArgs Event arguments.
return void
    protected virtual void OnIsBusyChanged( DependencyPropertyChangedEventArgs e )
    {
      if( IsBusy )
      {
        if( DisplayAfter.Equals( TimeSpan.Zero ) )
        {
          // Go visible now
          IsContentVisible = true;
        }
        else
        {
          // Set a timer to go visible
          _displayAfterTimer.Interval = DisplayAfter;
          _displayAfterTimer.Start();
        }
      }
      else
      {
        // No longer visible
        _displayAfterTimer.Stop();
        IsContentVisible = false;

        if( this.FocusAfterBusy != null )
        {
          this.FocusAfterBusy.Dispatcher.BeginInvoke( DispatcherPriority.Input, new Action( () =>
          {
            this.FocusAfterBusy.Focus();
            this.FocusAfterBusy = null;
          }
          ) );
        }
      }

      ChangeVisualState( true );
    }

Same methods

BusyIndicator::OnIsBusyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void