Xceed Toolkit Plus for WPF v5.0 Documentation
Xceed.Wpf.Toolkit Assembly / Xceed.Wpf.Toolkit Namespace / BusyIndicator Class
Members Example


In This Topic
    BusyIndicator Class
    In This Topic
    Represents a control that lets the user know when an application is busy.
    Syntax
    'Declaration
     
    <TemplateVisualStateAttribute(Name="Idle", GroupName="BusyStatusStates")>
    <StyleTypedPropertyAttribute(Property="OverlayStyle", StyleTargetType=System.Windows.Shapes.Rectangle)>
    <DefaultPropertyAttribute("Content")>
    <ContentPropertyAttribute("Content")>
    <LocalizabilityAttribute(LocalizationCategory.None, Readability=Readability.Unreadable)>
    <XmlLangPropertyAttribute("Language")>
    <UsableDuringInitializationAttribute(True)>
    <RuntimeNamePropertyAttribute("Name")>
    <UidPropertyAttribute("Uid")>
    <TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)>
    <NameScopePropertyAttribute("NameScope", System.Windows.NameScope)>
    Public Class BusyIndicator 
       Inherits System.Windows.Controls.ContentControl
    'Usage
     
    Dim instance As BusyIndicator
    [TemplateVisualState(Name="Idle", GroupName="BusyStatusStates")]
    [StyleTypedProperty(Property="OverlayStyle", StyleTargetType=System.Windows.Shapes.Rectangle)]
    [DefaultProperty("Content")]
    [ContentProperty("Content")]
    [Localizability(LocalizationCategory.None, Readability=Readability.Unreadable)]
    [XmlLangProperty("Language")]
    [UsableDuringInitialization(true)]
    [RuntimeNameProperty("Name")]
    [UidProperty("Uid")]
    [TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
    [NameScopeProperty("NameScope", System.Windows.NameScope)]
    public class BusyIndicator : System.Windows.Controls.ContentControl 
    Remarks
    Wrap the relevant content in an instance of the BusyIndicator control and toggle its IsBusy property to true during any long-running process.
    Example
    The following example shows how to set up a BusyIndicator using default settings.
    <xctk:BusyIndicator IsBusy="True" >
                <ContentControl Style="{StaticResource SampleContent}"/>
    </xctk:BusyIndicator>
    The following example shows how to set up a BusyIndicator with a custom message using the BusyContent property.
    <xctk:BusyIndicator IsBusy="True" BusyContent="Downloading email..." >
                <ContentControl Style="{StaticResource SampleContent}"/>
    </xctk:BusyIndicator>
    The following example shows how to set up a BusyIndicator that contains custom content.
    <xctk:BusyIndicator IsBusy="True" DisplayAfter="0">
           <xctk:BusyIndicator.BusyContentTemplate>
                <DataTemplate>
                     <StackPanel Margin="4">
                              <TextBlock Text="Downloading Email" FontWeight="Bold" HorizontalAlignment="Center"/>
                               <StackPanel Margin="4">
                                   <TextBlock Text="Downloading message 4/10..."/>
                                   <ProgressBar Value="40" Height="15"/>
                               </StackPanel>
                               <Grid>
                                   <Grid.ColumnDefinitions>
                                       <ColumnDefinition/>
                                       <ColumnDefinition/>
                                   </Grid.ColumnDefinitions>
                                   <Button Grid.Column="0" Content="Pause" HorizontalAlignment="Right" Margin="0 0 2 0"/>
                                   <Button Grid.Column="1" Content="Cancel" HorizontalAlignment="Left" Margin="2 0 0 0"/>
                               </Grid>
                      </StackPanel>
                </DataTemplate>
           </xctk:BusyIndicator.BusyContentTemplate>
           <xctk:BusyIndicator.OverlayStyle>
                      <Style TargetType="Rectangle">
                            <Setter Property="Fill" Value="#ffffeeee"/>
                      </Style>
           </xctk:BusyIndicator.OverlayStyle>
           <xctk:BusyIndicator.ProgressBarStyle>
                       <Style TargetType="ProgressBar">
                                <Setter Property="Visibility" Value="Collapsed"/>
                       </Style>
           </xctk:BusyIndicator.ProgressBarStyle>
           <ContentControl Style="{StaticResource SampleContent}"/>
    </xctk:BusyIndicator>
    Inheritance Hierarchy

    System.Object
       System.Windows.Threading.DispatcherObject
          System.Windows.DependencyObject
             System.Windows.Media.Visual
                System.Windows.UIElement
                   System.Windows.FrameworkElement
                      System.Windows.Controls.Control
                         System.Windows.Controls.ContentControl
                            Xceed.Wpf.Toolkit.BusyIndicator

    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also