Goffo.WpfLoadingSpinner 1.1.0

dotnet add package Goffo.WpfLoadingSpinner --version 1.1.0
NuGet\Install-Package Goffo.WpfLoadingSpinner -Version 1.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Goffo.WpfLoadingSpinner" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Goffo.WpfLoadingSpinner --version 1.1.0
#r "nuget: Goffo.WpfLoadingSpinner, 1.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Goffo.WpfLoadingSpinner as a Cake Addin
#addin nuget:?package=Goffo.WpfLoadingSpinner&version=1.1.0

// Install Goffo.WpfLoadingSpinner as a Cake Tool
#tool nuget:?package=Goffo.WpfLoadingSpinner&version=1.1.0

README

What is this repository for?

  • Custom Loading Spinner Control for WPF Applications
  • Version 1.0.0
  • Learn Markdown

How do I get set up?

  • XMAL Example
  1. LabelLoadingContent puts a Text above the spinner
  2. IsLoading controls if Spinner will display or be hidden
  3. Diameter and Thickness control the size of the Spinner
  4. Color and Foreground control the color of the spinner
  5. HorizontalAlignment and HorizontalConentAlignment are for the LabelLoadingConent alignment above Spinner
<Window x:Class="LoadingSpinner.WPF.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:LoadingSpinner.WPF"
        xmlns:custom="clr-namespace:LoadingSpinner.CustomControl;assembly=LoadingSpinner.CustomControl"
        mc:Ignorable="d"
        Title="Loading Spinner" Height="600" Width="800">
    <Grid>
        <custom:LoadingSpinner Margin="20"
                               LabelLoadingContent="{Binding Title, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                               IsLoading="{Binding IsLoading, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                               HorizontalAlignment="Center" 
                               HorizontalContentAlignment="Center" 
                               FontWeight="Bold" 
                               FontSize="36" 
                               Thickness="15" 
                               Diameter="200" 
                               Color="#0098DB"
                               Foreground="#0098DB"
                               Grid.Row="0">
        </custom:LoadingSpinner>
	</Grid>
</Window>
  • ViewModel Code Behind Example
    public class MainViewModel : INotifyPropertyChanged
    {
        #region Constructor

        public MainViewModel()
        {
            ToggleLoadingCommand = new ToggleLoadingCommand(this);
            UpdateTitleCommand = new UpdateTitleCommand(this);
        }

        #endregion

        #region Properties

        private bool _isLoading;
        public bool IsLoading
        {
            get => _isLoading;
            set
            {
                _isLoading = value;
                OnPropertyChanged(nameof(IsLoading));
            }
        }

        private string _title = "LOADING...";

        public string Title 
        {
            get => _title;

            set
            {
                _title = value;
                OnPropertyChanged(nameof(Title));
            }
        }

        private string _stagingTitle = string.Empty;

        public string StagingTitle
        {
            get => _stagingTitle;

            set
            {
                _stagingTitle = value;
                OnPropertyChanged(nameof(StagingTitle));
            }
        }

        #endregion

        #region Commands

        public ICommand ToggleLoadingCommand { get; set; }

        public ICommand UpdateTitleCommand { get; set; }

        #endregion

        #region Methods

        public void ToggleLoadingSpinner()
        {
            IsLoading = !IsLoading;
        }

        public void UpdateTitle()
        {
            Title = StagingTitle;
        }

        #endregion

        #region Property Changed Event

        public event PropertyChangedEventHandler? PropertyChanged;

        protected void OnPropertyChanged(string propertyName)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }

        #endregion
    }

Contribution guidelines

  • Contact Repo Owner or Admin

Who do I talk to?

  • Repo owner or admin
  • Other community or team contact
Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net7.0-windows7.0 is compatible.  net8.0-windows was computed.  net8.0-windows7.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0-windows7.0

    • No dependencies.
  • net7.0-windows7.0

    • No dependencies.
  • net8.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.

Version Downloads Last updated
1.1.0 113 1/24/2024
1.0.0 197 10/19/2023

Targets multiple .NET versions.