Version

Configuring Busy Content (xamBusyIndicator)

Topic Overview

Purpose

This topic explains how to configure the xamBusyIndicator busy content.

Required background

The following topics are prerequisites to understanding this topic:

Topic Purpose

This topic explains the features supported by the control from developer perspective.

This topic provides an overview of the visual elements of the control.

In this topic

This topic contains the following sections:

Configuring Busy Content

Overview

The xamBusyIndicator busy content is the content under the animation area.

Use the XamBusyIndicator BusyContent property to place a text or a FrameworkElement.

Two examples follow to demonstrate both setting text and a FrameworkElement for xamBusyIndicator busy content.

By default, the initial value of the BusyContent property is null.

Property settings

The following table maps the desired configuration to the property settings that manage it.

In order to: Use this property: And set it to:

Configure the displayed busy content

object

Setting text as busy content - Example

The screenshot below demonstrates how the xamBusyIndicator looks as a result of the following settings:

Property Value

"Please, wait …​"

Configuring Busy Content 1.png

Following is the code that implements this example.

In XAML:

<ig:XamBusyIndicator IsBusy="True" BusyContent="Please, wait ..." />

Setting a FrameworkElement as busy content - Example

The screenshot below demonstrates how the xamBusyIndicator looks as a result of the following settings:

Property Value

<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">

<Button Content="Start" Width="50" Margin="5"/>

<Button Content="Cancel" Width="50" Margin="5" />

</StackPanel>

Configuring Busy Content 2.png

Following is the code that implements this example.

In XAML:

<ig:XamBusyIndicator IsBusy="True">
    <ig:XamBusyIndicator.BusyContent>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
            <Button Content="Start" Width="50" Margin="5"/>
            <Button Content="Cancel" Width="50" Margin="5" />
        </StackPanel>
    </ig:XamBusyIndicator.BusyContent>
</ig:XamBusyIndicator>

Applying Busy Content Template

Overview

Use the XamBusyIndicator BusyContentTemplate property to apply a custom template to the xamBusyIndicator busy content.

Property settings

The following table maps the desired configuration to the property settings that manage it.

In order to: Use this property: And set it to:

Apply a custom template to the busy content

DataTemplate

Example

The screenshot below demonstrates how the xamBusyIndicator would look as a result of the following settings:

Property Value

<DataTemplate>

<StackPanel Orientation="Vertical">

<TextBlock Text="{Binding ProgressValue, StringFormat={}{0:P0}}" />

<Slider Maximum="1" Minimum="0" Width="80" Value="{Binding ProgressValue}" />

</StackPanel>

</DataTemplate>

Configuring Busy Content 3.png

Following is the code that implements this example.

In XAML:

<ig:XamBusyIndicator IsBusy="True" Animation="ProgressBar"
                     BusyContent="{Binding RelativeSource={RelativeSource Self}}"
                     ProgressValue=".5">
    <ig:XamBusyIndicator.BusyContentTemplate>
        <DataTemplate>
            <StackPanel Orientation="Vertical">
                <TextBlock Text="{Binding ProgressValue, StringFormat={}{0:P0}}" />
                <Slider Maximum="1" Minimum="0" Width="80" Value="{Binding ProgressValue}" />
            </StackPanel>
        </DataTemplate>
    </ig:XamBusyIndicator.BusyContentTemplate>
</ig:XamBusyIndicator>

Related Topics

The following topics provide additional information related to this topic.

Topic Purpose

This topic explains how to display the xamBusyIndicator control.

This topic explains how to configure the delay before displaying the xamBusyIndicator control.

This topic explains how to configure explicitly which UIElement receives the focus when the xamBusyIndicator is no longer active.

This topic explains how to configure the xamBusyIndicator control to display determine progress.

This topic explains how to customize the xamBusyIndicator overlay style.

This topic explains how to customize the xamBusyIndicator control default animations brushes.