# Wait Indicator | WPF Controls | DevExpress Documentation

## Overview

The **Wait Indicator** is a popup panel used to indicate the progress of operations during your application run.

![Wait Indicator](/WPF/images/wait-indicator118758.gif)

Some **DevExpress WPF Controls** (the [GridControl](/WPF/DevExpress.Xpf.Grid.GridControl),[LoadingDecorator](/WPF/DevExpress.Xpf.Core.LoadingDecorator), etc.) use this panel to provide visual feedback during data/content/etc. loading.

Note

The **Wait Indicator** works within the main application’s UI thread. The UI freezes may affect the **Wait Indicator** animation.

To display an indicator that works in a separate UI thread, use the [Splash Screen Manager](/WPF/401685/controls-and-libraries/windows-and-utility-controls/splash-screen-manager).

## Customization Capabilities

The **Wait Indicator**‘s appearance depends on the applied theme. Here are examples of a Wait Indicator shown in different themes.

![WaitIndicatorThemes](/WPF/images/waitindicatorthemes118761.png)

The default layout of the **Wait Indicator** consists of the animated image and the label. 

You can customize the **Wait Indicator**‘s layout using the **ContentTemplate** property. The code snippet below illustrates how to set the custom **Wait Indicator** content.

- XAML

<section id="tabpanel_oWLMLu3bsz_tabid-xaml" role="tabpanel" data-tab="tabid-xaml">
<pre><code class="lang-xaml">&lt;dx:WaitIndicator Content=&quot;Loading...&quot;&gt;
    &lt;dx:WaitIndicator.ContentTemplate&gt;
        &lt;DataTemplate&gt;
            &lt;StackPanel Orientation=&quot;Vertical&quot;&gt;
                &lt;TextBlock Text=&quot;Please Wait&quot; FontSize=&quot;20&quot;/&gt;
                &lt;TextBlock Text=&quot;{Binding}&quot;/&gt;
            &lt;/StackPanel&gt;
        &lt;/DataTemplate&gt;
    &lt;/dx:WaitIndicator.ContentTemplate&gt;
&lt;/dx:WaitIndicator&gt;
</code></pre></section>

The image below illustrates the result.

![WaitIndicatorCustomization](/WPF/images/waitindicatorcustomization118763.gif)

## Displaying Wait Indicator

To use the **WaitIndicator** control in your application, add it to your form and control its visibility using the **DeferedVisibility** property.

- XAML

<section id="tabpanel_oWLMLu3bsz-1_tabid-xaml" role="tabpanel" data-tab="tabid-xaml">
<pre><code class="lang-xaml">&lt;Grid&gt;
        &lt;UserControl Background=&quot;LightGray&quot;/&gt;
        &lt;dx:WaitIndicator DeferedVisibility=&quot;True&quot; Content=&quot;Loading...&quot;&gt;
            &lt;dx:WaitIndicator.ContentTemplate&gt;
                &lt;DataTemplate&gt;
                    &lt;StackPanel Orientation=&quot;Vertical&quot;&gt;
                        &lt;TextBlock Text=&quot;Please Wait&quot; FontSize=&quot;20&quot;/&gt;
                        &lt;TextBlock Text=&quot;{Binding}&quot;/&gt;
                    &lt;/StackPanel&gt;
                &lt;/DataTemplate&gt;
            &lt;/dx:WaitIndicator.ContentTemplate&gt;
        &lt;/dx:WaitIndicator&gt;
    &lt;/Grid&gt;
</code></pre></section>

## Example

To control the WaitIndicator control’s visibility, use the **DeferedVisibility** property. As for changing WaitIndicator’s properties, it is a common WPF control and you can change its properties in code behind or using bindings. You can read more about the bindings here: [Data Binding(WPF)](https://docs.microsoft.com/en-us/dotnet/desktop-wpf/data/data-binding-overview).

[View Example](https://github.com/DevExpress-Examples/wpf-display-wait-indicator)

- MainWindow.xaml

<section id="tabpanel_LPB0Jeel5w_tabid-xamlMainWindow-xaml" role="tabpanel" data-tab="tabid-xamlMainWindow-xaml">
<pre><code class="lang-xaml">&lt;Window
    xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
    xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
    xmlns:local=&quot;clr-namespace:dxSampleGrid&quot;
    xmlns:dx=&quot;http://schemas.devexpress.com/winfx/2008/xaml/core&quot;
    xmlns:dxg=&quot;http://schemas.devexpress.com/winfx/2008/xaml/grid&quot;
    xmlns:dxb=&quot;http://schemas.devexpress.com/winfx/2008/xaml/bars&quot;
    xmlns:dxe=&quot;http://schemas.devexpress.com/winfx/2008/xaml/editors&quot;
    xmlns:dxmvvm=&quot;http://schemas.devexpress.com/winfx/2008/xaml/mvvm&quot;
     xmlns:dxr=&quot;http://schemas.devexpress.com/winfx/2008/xaml/ribbon&quot;
    xmlns:dxgt=&quot;http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys&quot;
    xmlns:dxet=&quot;http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys&quot;
      xmlns:dxc=&quot;http://schemas.devexpress.com/winfx/2008/xaml/core&quot;
    xmlns:dxlc=&quot;http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol&quot;
    x:Class=&quot;dxSampleGrid.MainWindow&quot;
    Title=&quot;DXApplication&quot; Height=&quot;700&quot; Width=&quot;1100&quot;
    SnapsToDevicePixels=&quot;True&quot; UseLayoutRounding=&quot;True&quot;&gt;
    &lt;Window.Resources&gt;

    &lt;/Window.Resources&gt;
    &lt;Grid&gt;
        &lt;Grid.RowDefinitions&gt;
            &lt;RowDefinition Height=&quot;9*&quot;/&gt;
            &lt;RowDefinition Height=&quot;2*&quot;/&gt;
        &lt;/Grid.RowDefinitions&gt;
        &lt;Grid Grid.Row=&quot;0&quot;&gt;
            &lt;UserControl Background=&quot;LightGray&quot;/&gt;
            &lt;dx:WaitIndicator DeferedVisibility=&quot;{Binding IsWaitIndicatorVisible}&quot; Content=&quot;{Binding WaitIndicatorText}&quot;&gt;
                &lt;dx:WaitIndicator.ContentTemplate&gt;
                    &lt;DataTemplate&gt;
                        &lt;StackPanel Orientation=&quot;Vertical&quot;&gt;
                            &lt;TextBlock Text=&quot;Please Wait&quot; FontSize=&quot;20&quot;/&gt;
                            &lt;TextBlock Text=&quot;{Binding}&quot;/&gt;
                        &lt;/StackPanel&gt;
                    &lt;/DataTemplate&gt;
                &lt;/dx:WaitIndicator.ContentTemplate&gt;
            &lt;/dx:WaitIndicator&gt;

    &lt;/Grid&gt;
        &lt;Grid Grid.Row=&quot;3&quot;&gt;
                &lt;StackPanel&gt;
            &lt;Button Content=&quot;Start/stop indicator&quot; Click=&quot;Button_Click&quot; /&gt;
                &lt;Button Content=&quot;Change text&quot; Click=&quot;Button_Click_1&quot;/&gt;
            &lt;/StackPanel&gt;

        &lt;/Grid&gt;

    &lt;/Grid&gt;

&lt;/Window&gt;
</code></pre></section>

- MyViewModel.cs
- MyViewModel.vb

<section id="tabpanel_LPB0Jeel5w-1_tabid-csharpMyViewModel-cs" role="tabpanel" data-tab="tabid-csharpMyViewModel-cs">
<pre><code data-code-links="{&quot;/ (System)(?:;|$)/&quot;:&quot;https://learn.microsoft.com/dotnet/api/system&quot;,&quot;/ (System.ComponentModel)(?:;|$)/&quot;:&quot;https://learn.microsoft.com/dotnet/api/system.componentmodel&quot;}" class="lang-csharp">using System;
using System.ComponentModel;

namespace dxSampleGrid {
    public partial class MyViewModel : INotifyPropertyChanged{

        public MyViewModel() {
            WaitIndicatorText = &quot;Loading...&quot;;
        }

        bool _isWaitIndicatorVisible;
        string _waitIndicatorText;

        public bool IsWaitIndicatorVisible {
            get {
                return _isWaitIndicatorVisible;
            }

            set {
                _isWaitIndicatorVisible = value;
                RaisePropertyChanged(&quot;IsWaitIndicatorVisible&quot;);
            }
        }

        public string WaitIndicatorText {
            get {
                return _waitIndicatorText;
            }

            set {
                _waitIndicatorText = value;
                RaisePropertyChanged(&quot;WaitIndicatorText&quot;);
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        private void RaisePropertyChanged(String propertyName) {
            if (PropertyChanged != null) {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    } 
}
</code></pre></section>
<section id="tabpanel_LPB0Jeel5w-1_tabid-vbMyViewModel-vb" role="tabpanel" data-tab="tabid-vbMyViewModel-vb" aria-hidden="true" hidden="hidden">
<pre><code data-code-links="{&quot;/ (System)(?:;|$)/&quot;:&quot;https://learn.microsoft.com/dotnet/api/system&quot;,&quot;/ (System.ComponentModel)(?:;|$)/&quot;:&quot;https://learn.microsoft.com/dotnet/api/system.componentmodel&quot;}" class="lang-vb">Imports System
Imports System.ComponentModel

Namespace dxSampleGrid
    Partial Public Class MyViewModel
        Implements INotifyPropertyChanged

        Public Sub New()
            WaitIndicatorText = &quot;Loading...&quot;
        End Sub

        Private _isWaitIndicatorVisible As Boolean
        Private _waitIndicatorText As String

        Public Property IsWaitIndicatorVisible() As Boolean
            Get
                Return _isWaitIndicatorVisible
            End Get

            Set(ByVal value As Boolean)
                _isWaitIndicatorVisible = value
                RaisePropertyChanged(&quot;IsWaitIndicatorVisible&quot;)
            End Set
        End Property

        Public Property WaitIndicatorText() As String
            Get
                Return _waitIndicatorText
            End Get

            Set(ByVal value As String)
                _waitIndicatorText = value
                RaisePropertyChanged(&quot;WaitIndicatorText&quot;)
            End Set
        End Property

        Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
        Private Sub RaisePropertyChanged(ByVal propertyName As String)
            RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
        End Sub
    End Class
End Namespace
</code></pre></section>

- MainWindow.xaml.cs
- MainWindow.xaml.vb

<section id="tabpanel_LPB0Jeel5w-2_tabid-csharpMainWindow-xaml-cs" role="tabpanel" data-tab="tabid-csharpMainWindow-xaml-cs">
<pre><code data-code-links="{&quot;/ (DevExpress.Xpf.Grid)(?:;|$)/&quot;:&quot;/WPF/DevExpress.Xpf.Grid&quot;,&quot;/ (System)(?:;|$)/&quot;:&quot;https://learn.microsoft.com/dotnet/api/system&quot;,&quot;/ (System.Windows)(?:;|$)/&quot;:&quot;https://learn.microsoft.com/dotnet/api/system.windows&quot;}" class="lang-csharp">using DevExpress.Xpf.Grid;

using System;
using System.Windows;

namespace dxSampleGrid {
    public partial class MainWindow : Window {
        public MainWindow() {
            InitializeComponent();
            vm = new MyViewModel();
            DataContext = vm;
        }
        MyViewModel vm;

        private void Button_Click(object sender, RoutedEventArgs e) {
            vm.IsWaitIndicatorVisible = !vm.IsWaitIndicatorVisible;
        }

        private void Button_Click_1(object sender, RoutedEventArgs e) {
            vm.WaitIndicatorText = &quot;Initializing... &quot; + DateTime.Now.Millisecond;
        }
    }
}
</code></pre></section>
<section id="tabpanel_LPB0Jeel5w-2_tabid-vbMainWindow-xaml-vb" role="tabpanel" data-tab="tabid-vbMainWindow-xaml-vb" aria-hidden="true" hidden="hidden">
<pre><code data-code-links="{&quot;/ (DevExpress.Xpf.Grid)(?:;|$)/&quot;:&quot;/WPF/DevExpress.Xpf.Grid&quot;,&quot;/ (System)(?:;|$)/&quot;:&quot;https://learn.microsoft.com/dotnet/api/system&quot;,&quot;/ (System.Windows)(?:;|$)/&quot;:&quot;https://learn.microsoft.com/dotnet/api/system.windows&quot;}" class="lang-vb">Imports DevExpress.Xpf.Grid

Imports System
Imports System.Windows

Namespace dxSampleGrid
    Partial Public Class MainWindow
        Inherits Window

        Public Sub New()
            InitializeComponent()
            vm = New MyViewModel()
            DataContext = vm
        End Sub
        Private vm As MyViewModel

        Private Sub Button_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
            vm.IsWaitIndicatorVisible = Not vm.IsWaitIndicatorVisible
        End Sub

        Private Sub Button_Click_1(ByVal sender As Object, ByVal e As RoutedEventArgs)
            vm.WaitIndicatorText = &quot;Initializing... &quot; &amp; Date.Now.Millisecond
        End Sub
    End Class

End Namespace
</code></pre></section>

See Also

[Create a Circular Progress Bar](https://github.com/DevExpress-Examples/create-circular-progress-bar-with-wpf-gauges)