BusyIndicator for Windows Presentation Foundation (WPF)
- .Net Framework 4.6 or higher
- .Net Core 3.1
- .Net 5.0
- Install the package via NuGet:
Install-Package BusyIndicator
- Add resource call to App.xaml:
<Application.Resources>
<ResourceDictionary Source="pack://application:,,,/BusyIndicator;component/Theme/Default.xaml"/>
</Application.Resources>
- Add a reference to the library in your view:
xmlns:busyIndicator="https://github.com/Peoky/BusyIndicator"
- Create a BusyMask on top of main view:
<busyindicator:BusyMask x:Name="BusyIndicator" IsBusy="False" IndicatorType="Dashes" BusyContent="Please wait..." >
<... MAIN VIEW GOES HERE... >
</busyIndicator:BusyMask>
- Bind or Set
IsBusy
property:
Indicator colors can be changed now, All you have to do is overriding the colors on your Window, UserControl or even BusyMask resources as following:
<Window.Resources> <SolidColorBrush x:Key="IndicatorForeground" Color="Orange" /> <SolidColorBrush x:Key="IndicatorBackground" Color="WhiteSmoke" /> </Window.Resources>
You can also use gradients:
<LinearGradientBrush x:Key="IndicatorForeground" StartPoint="0.5,0" EndPoint="0.5,1"> <GradientStop Offset="1" Color="#eaafc8" /> <GradientStop Offset="0" Color="#654ea3" /> </LinearGradientBrush>
Not all indicators have background, so that change background might not affect all indicators.
If you like this, give it a * please.