BusyIndicators 2.1.3
dotnet add package BusyIndicators --version 2.1.3
NuGet\Install-Package BusyIndicators -Version 2.1.3
<PackageReference Include="BusyIndicators" Version="2.1.3" />
<PackageVersion Include="BusyIndicators" Version="2.1.3" />
<PackageReference Include="BusyIndicators" />
paket add BusyIndicators --version 2.1.3
#r "nuget: BusyIndicators, 2.1.3"
#addin nuget:?package=BusyIndicators&version=2.1.3
#tool nuget:?package=BusyIndicators&version=2.1.3
BusyIndicator
BusyIndicator for Windows Presentation Foundation (WPF)
<p align="center"> <img src="https://github.com/moh3ngolshani/BusyIndicator/blob/master/Images/Demo.gif" alt="Demo" style="width: 50%;"></img> </p>
<p align="center"> <img src="https://github.com/moh3ngolshani/BusyIndicator/blob/master/Images/Indicators.gif" alt="Indicator Types" width="95%"></img> </p>
Prerequisites:
<ul><li>.Net Framework 4.8+</li></ul> <ul><li>.Net Core6+</li></ul>
How to use:
- Install the package via NuGet: <pre>Install-Package BusyIndicators</pre>
Note NuGet address has changed. <br />
Add the following resource to App.xaml: <pre><code><Application.Resources> <ResourceDictionary Source="pack://application:,,,/BusyIndicator;component/Theme/Default.xaml"/> </Application.Resources> </code></pre>
Add a reference to the library: <pre>xmlns:busyIndicator="https://github.com/moh3ngolshani/BusyIndicator"</pre>
Create a BusyMask on top of your main view: <pre><code><busyIndicator:BusyMask x:Name="BusyIndicator" IsBusy="False" IndicatorType="Dashes" BusyContent="Please wait..." BusyContentMargin="0,20,0,0" IsBusyAtStartup="False" >
<... MAIN VIEW GOES HERE... >
</busyIndicator:BusyMask></code></pre>
- Bind or Set the
IsBusy
property.
How to change indicator sizes:
You can now customize the indicator sizes:
Add a reference to the mscorlib assembly: <pre>xmlns:sys="clr-namespace:System;assembly=mscorlib"</pre>
Override the
IndicatorScaleX
&IndicatorScaleY
properties:
<pre> <Window.Resources> <sys:Double x:Key="IndicatorScaleX" >2</sys:Double> <sys:Double x:Key="IndicatorScaleY" >2</sys:Double> </Window.Resources> </pre>
How to change indicator colors:
Override the IndicatorForeground
& IndicatorBackground
properties:
<pre> <Window.Resources> <SolidColorBrush x:Key="IndicatorForeground" Color="Orange" /> <SolidColorBrush x:Key="IndicatorBackground" Color="WhiteSmoke" /> </Window.Resources> </pre>
You can also use gradients:
<pre> <LinearGradientBrush x:Key="IndicatorForeground" StartPoint="0.5,0" EndPoint="0.5,1"> <GradientStop Offset="1" Color="#eaafc8" /> <GradientStop Offset="0" Color="#654ea3" /> </LinearGradientBrush> </pre>
Hint:
Not all indicators have background, so changing the
IndicatorBackground
may not affect all indicators.
If you like this, feel free to show your support!
<a href="https://www.buymeacoffee.com/coffeemakes" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-green.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0-windows7.0 is compatible. net7.0-windows was computed. net8.0-windows was computed. net9.0-windows was computed. |
.NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- No dependencies.
-
net6.0-windows7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Respect the initial value of IsBusy, deprecate IsBusyAtStartup. Minimum required .NET version updated to 4.8. Updated NuGet package version from 2.1.2 to 2.1.3