[Root] / Xceed.Wpf.Toolkit Assembly / Xceed.Wpf.Toolkit Namespace / BusyIndicator Class / BusyContentTemplate Property
Example


In This Topic
    BusyContentTemplate Property
    In This Topic
    Gets or sets the DataTemplate to use for displaying the busy content to the user.
    Syntax
    'Declaration
     
    
    Public Property BusyContentTemplate As DataTemplate
    'Usage
     
    
    Dim instance As BusyIndicator
    Dim value As DataTemplate
     
    instance.BusyContentTemplate = value
     
    value = instance.BusyContentTemplate
    public DataTemplate BusyContentTemplate {get; set;}

    Property Value

    A DataTemplate to use for displaying the busy content to the user.
    Example
    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>
    Supported Frameworks

    .NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.

    .NET Framework: net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.

    See Also