https://github.com/moh3ngolshani/busyindicator
Busy Indicator for WPF
https://github.com/moh3ngolshani/busyindicator
busyindicator csharp indicator loader loading loading-indicator loading-spinner spinner wpf
Last synced: 5 months ago
JSON representation
Busy Indicator for WPF
- Host: GitHub
- URL: https://github.com/moh3ngolshani/busyindicator
- Owner: Moh3nGolshani
- License: mit
- Created: 2021-01-15T17:16:50.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-13T10:48:27.000Z (about 1 year ago)
- Last Synced: 2025-09-16T07:13:06.986Z (9 months ago)
- Topics: busyindicator, csharp, indicator, loader, loading, loading-indicator, loading-spinner, spinner, wpf
- Language: C#
- Homepage:
- Size: 24.9 MB
- Stars: 148
- Watchers: 8
- Forks: 22
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BusyIndicator
BusyIndicator for Windows Presentation Foundation (WPF)
## Prerequisites:
- .Net Framework 4.8+
- .Net Core6+
## How to use:
1. Install the package via [NuGet](https://www.nuget.org/packages/BusyIndicators):
Install-Package BusyIndicators
> **Note**
> NuGet address has changed.
2. Add the following resource to App.xaml:
<Application.Resources>
<ResourceDictionary Source="pack://application:,,,/BusyIndicator;component/Theme/Default.xaml"/>
</Application.Resources>
3. Add a reference to the library:
xmlns:busyIndicator="https://github.com/moh3ngolshani/BusyIndicator"
4. Create a BusyMask on top of your main view:
<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>
5. 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:
xmlns:sys="clr-namespace:System;assembly=mscorlib"
* Override the `IndicatorScaleX` & `IndicatorScaleY` properties:
<Window.Resources>
<sys:Double x:Key="IndicatorScaleX" >2</sys:Double>
<sys:Double x:Key="IndicatorScaleY" >2</sys:Double>
</Window.Resources>
### How to change indicator colors:
Override the `IndicatorForeground` & `IndicatorBackground` properties:
<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>
#### 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!
