├── Images └── demo.gif ├── LoadingAnimation.Avalonia ├── Assets │ └── avalonia-logo.ico ├── Bars │ ├── Bar1.axaml.cs │ ├── Bar2.axaml.cs │ ├── Bar3.axaml.cs │ ├── Bar4.axaml.cs │ ├── Bar1.axaml │ ├── Bar2.axaml │ ├── Bar3.axaml │ └── Bar4.axaml ├── Dots │ ├── Dots1.axaml.cs │ ├── Dots3.axaml.cs │ ├── Dots4.axaml.cs │ ├── Dots5.axaml.cs │ ├── Dots6.axaml.cs │ ├── Dots2.axaml.cs │ ├── Dots5.axaml │ ├── Dots2.axaml │ ├── Dots1.axaml │ ├── Dots4.axaml │ ├── Dots3.axaml │ └── Dots6.axaml ├── Classic │ ├── Classic1.axaml.cs │ ├── Classic2.axaml.cs │ ├── Classic4.axaml.cs │ ├── Classic7.axaml.cs │ ├── Classic9.axaml.cs │ ├── ClassicBase.cs │ ├── Classic3.axaml │ ├── Classic5.axaml │ ├── Classic8.axaml │ ├── Classic6.axaml │ ├── Classic2.axaml │ ├── Classic5.axaml.cs │ ├── Classic4.axaml │ ├── Classic1.axaml │ ├── Classic8.axaml.cs │ ├── Classic6.axaml.cs │ ├── Classic3.axaml.cs │ ├── Classic9.axaml │ └── Classic7.axaml ├── Spinner │ ├── Spinner1.axaml.cs │ ├── Spinner2.axaml.cs │ ├── Spinner3.axaml.cs │ ├── Spinner4.axaml.cs │ ├── Spinner5.axaml.cs │ ├── Spinner3.axaml │ ├── Spinner4.axaml │ ├── Spinner2.axaml │ ├── Spinner1.axaml │ └── Spinner5.axaml ├── Progress │ ├── Progress1.axaml.cs │ ├── Progress2.axaml.cs │ ├── Progress3.axaml.cs │ ├── Progress4.axaml.cs │ ├── Progress5.axaml.cs │ ├── Progress6.axaml.cs │ ├── Progress1.axaml │ ├── Progress5.axaml │ ├── Progress6.axaml │ ├── Progress2.axaml │ ├── Progress4.axaml │ └── Progress3.axaml ├── Themes │ └── Index.axaml ├── LoadingAnimation.Avalonia.csproj └── Animators │ └── GeometryAnimator.cs ├── LoadingAnimation.Avalonia.Demo ├── Assets │ └── avalonia-logo.ico ├── ViewModels │ ├── ViewModelBase.cs │ └── MainWindowViewModel.cs ├── Views │ ├── BarsPage.axaml.cs │ ├── DotsPage.axaml.cs │ ├── ClassicPage.axaml.cs │ ├── SpinnerPage.axaml.cs │ ├── ProgressPage.axaml.cs │ ├── BarsPage.axaml │ ├── SpinnerPage.axaml │ ├── DotsPage.axaml │ ├── ProgressPage.axaml │ ├── MainWindow.axaml.cs │ ├── ClassicPage.axaml │ └── MainWindow.axaml ├── Program.cs ├── app.manifest ├── ViewLocator.cs ├── App.axaml ├── App.axaml.cs └── LoadingAnimation.Avalonia.Demo.csproj ├── README.md ├── LoadingAnimation.Avalonia.sln ├── .gitattributes └── .gitignore /Images/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JamesBaiJun/LoadingAnimation.Avalonia/HEAD/Images/demo.gif -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Assets/avalonia-logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JamesBaiJun/LoadingAnimation.Avalonia/HEAD/LoadingAnimation.Avalonia/Assets/avalonia-logo.ico -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.Demo/Assets/avalonia-logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JamesBaiJun/LoadingAnimation.Avalonia/HEAD/LoadingAnimation.Avalonia.Demo/Assets/avalonia-logo.ico -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.Demo/ViewModels/ViewModelBase.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.ComponentModel; 2 | 3 | namespace LoadingAnimation.Avalonia.Demo.ViewModels 4 | { 5 | public class ViewModelBase : ObservableObject 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Contains some simple loading animations 2 | LoadingAnimation is a AvloniaUI Project,It Contains some simple loading animations. 3 | 4 | ![demo image](https://github.com/JamesBaiJun/LoadingAnimation.Avalonia/blob/master/Images/demo.gif) 5 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Bars/Bar1.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Bars 4 | { 5 | public partial class Bar1 : UserControl 6 | { 7 | public Bar1() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Bars/Bar2.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Bars 4 | { 5 | public partial class Bar2 : UserControl 6 | { 7 | public Bar2() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Bars/Bar3.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Bars 4 | { 5 | public partial class Bar3 : UserControl 6 | { 7 | public Bar3() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Bars/Bar4.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Bars 4 | { 5 | public partial class Bar4 : UserControl 6 | { 7 | public Bar4() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Dots/Dots1.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Dots 4 | { 5 | public partial class Dots1 : UserControl 6 | { 7 | public Dots1() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Dots/Dots3.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Dots 4 | { 5 | public partial class Dots3 : UserControl 6 | { 7 | public Dots3() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Dots/Dots4.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Dots 4 | { 5 | public partial class Dots4 : UserControl 6 | { 7 | public Dots4() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Dots/Dots5.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Dots 4 | { 5 | public partial class Dots5 : UserControl 6 | { 7 | public Dots5() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Dots/Dots6.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Dots 4 | { 5 | public partial class Dots6 : UserControl 6 | { 7 | public Dots6() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Classic/Classic1.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Classic 4 | { 5 | public partial class Classic1 : ClassicBase 6 | { 7 | public Classic1() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Classic/Classic2.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Classic 4 | { 5 | public partial class Classic2 : ClassicBase 6 | { 7 | public Classic2() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Classic/Classic4.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Classic 4 | { 5 | public partial class Classic4 : ClassicBase 6 | { 7 | public Classic4() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Classic/Classic7.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Classic 4 | { 5 | public partial class Classic7 : ClassicBase 6 | { 7 | public Classic7() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Classic/Classic9.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Classic 4 | { 5 | public partial class Classic9 : ClassicBase 6 | { 7 | public Classic9() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Spinner/Spinner1.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Spinner 4 | { 5 | public partial class Spinner1 : UserControl 6 | { 7 | public Spinner1() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Spinner/Spinner2.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Spinner 4 | { 5 | public partial class Spinner2 : UserControl 6 | { 7 | public Spinner2() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Spinner/Spinner3.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Spinner 4 | { 5 | public partial class Spinner3 : UserControl 6 | { 7 | public Spinner3() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Spinner/Spinner4.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Spinner 4 | { 5 | public partial class Spinner4 : UserControl 6 | { 7 | public Spinner4() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.Demo/Views/BarsPage.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Demo.Views 4 | { 5 | public partial class BarsPage : UserControl 6 | { 7 | public BarsPage() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.Demo/Views/DotsPage.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Demo.Views 4 | { 5 | public partial class DotsPage : UserControl 6 | { 7 | public DotsPage() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Progress/Progress1.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Progress 4 | { 5 | public partial class Progress1 : UserControl 6 | { 7 | public Progress1() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Progress/Progress2.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Progress 4 | { 5 | public partial class Progress2 : UserControl 6 | { 7 | public Progress2() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Progress/Progress3.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Progress 4 | { 5 | public partial class Progress3 : UserControl 6 | { 7 | public Progress3() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Progress/Progress4.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Progress 4 | { 5 | public partial class Progress4 : UserControl 6 | { 7 | public Progress4() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Progress/Progress5.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Progress 4 | { 5 | public partial class Progress5 : UserControl 6 | { 7 | public Progress5() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Progress/Progress6.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Progress 4 | { 5 | public partial class Progress6 : UserControl 6 | { 7 | public Progress6() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.Demo/Views/ClassicPage.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Demo.Views 4 | { 5 | public partial class ClassicPage : UserControl 6 | { 7 | public ClassicPage() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.Demo/Views/SpinnerPage.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Demo.Views 4 | { 5 | public partial class SpinnerPage : UserControl 6 | { 7 | public SpinnerPage() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Dots/Dots2.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Animation; 2 | using Avalonia.Controls; 3 | 4 | namespace LoadingAnimation.Avalonia.Dots 5 | { 6 | public partial class Dots2 : UserControl 7 | { 8 | public Dots2() 9 | { 10 | InitializeComponent(); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Spinner/Spinner5.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace LoadingAnimation.Avalonia.Spinner; 6 | 7 | public partial class Spinner5 : UserControl 8 | { 9 | public Spinner5() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.Demo/Views/ProgressPage.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace LoadingAnimation.Avalonia.Demo.Views 4 | { 5 | public partial class ProgressPage : UserControl 6 | { 7 | public ProgressPage() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Themes/Index.axaml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.Demo/ViewModels/MainWindowViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace LoadingAnimation.Avalonia.Demo.ViewModels 2 | { 3 | public partial class MainWindowViewModel : ViewModelBase 4 | { 5 | #pragma warning disable CA1822 // Mark members as static 6 | public string TestStr => "加载中..."; 7 | #pragma warning restore CA1822 // Mark members as static 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Classic/ClassicBase.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace LoadingAnimation.Avalonia.Classic 10 | { 11 | public class ClassicBase : UserControl 12 | { 13 | public static readonly StyledProperty CaptionTextProperty = 14 | AvaloniaProperty.Register(nameof(CaptionText), defaultValue: "Loading..."); 15 | 16 | public object CaptionText 17 | { 18 | get => GetValue(CaptionTextProperty); 19 | set => SetValue(CaptionTextProperty, value); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/LoadingAnimation.Avalonia.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | Library 4 | net8.0 5 | enable 6 | latest 7 | BaiJun 8 | 0.1.0-beta20240529 9 | true 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.Demo/Program.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using System; 3 | 4 | namespace LoadingAnimation.Avalonia.Demo 5 | { 6 | internal sealed class Program 7 | { 8 | // Initialization code. Don't use any Avalonia, third-party APIs or any 9 | // SynchronizationContext-reliant code before AppMain is called: things aren't initialized 10 | // yet and stuff might break. 11 | [STAThread] 12 | public static void Main(string[] args) => BuildAvaloniaApp() 13 | .StartWithClassicDesktopLifetime(args); 14 | 15 | // Avalonia configuration, don't remove; also used by visual designer. 16 | public static AppBuilder BuildAvaloniaApp() 17 | => AppBuilder.Configure() 18 | .UsePlatformDetect() 19 | .WithInterFont() 20 | .LogToTrace(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Classic/Classic3.axaml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.Demo/Views/BarsPage.axaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.Demo/Views/SpinnerPage.axaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Classic/Classic5.axaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.Demo/app.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.Demo/ViewLocator.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Controls.Templates; 3 | using LoadingAnimation.Avalonia.Demo.ViewModels; 4 | using System; 5 | 6 | namespace LoadingAnimation.Avalonia.Demo 7 | { 8 | public class ViewLocator : IDataTemplate 9 | { 10 | 11 | public Control? Build(object? data) 12 | { 13 | if (data is null) 14 | return null; 15 | 16 | var name = data.GetType().FullName!.Replace("ViewModel", "View", StringComparison.Ordinal); 17 | var type = Type.GetType(name); 18 | 19 | if (type != null) 20 | { 21 | var control = (Control)Activator.CreateInstance(type)!; 22 | control.DataContext = data; 23 | return control; 24 | } 25 | 26 | return new TextBlock { Text = "Not Found: " + name }; 27 | } 28 | 29 | public bool Match(object? data) 30 | { 31 | return data is ViewModelBase; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.Demo/App.axaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.Demo/Views/DotsPage.axaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Classic/Classic8.axaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.Demo/Views/ProgressPage.axaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Classic/Classic6.axaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.Demo/App.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Controls.ApplicationLifetimes; 4 | using Avalonia.Data.Core; 5 | using Avalonia.Data.Core.Plugins; 6 | using Avalonia.Markup.Xaml; 7 | using LoadingAnimation.Avalonia.Demo.ViewModels; 8 | using LoadingAnimation.Avalonia.Demo.Views; 9 | 10 | namespace LoadingAnimation.Avalonia.Demo 11 | { 12 | public partial class App : Application 13 | { 14 | public override void Initialize() 15 | { 16 | AvaloniaXamlLoader.Load(this); 17 | } 18 | 19 | public override void OnFrameworkInitializationCompleted() 20 | { 21 | if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) 22 | { 23 | // Line below is needed to remove Avalonia data validation. 24 | // Without this line you will get duplicate validations from both Avalonia and CT 25 | BindingPlugins.DataValidators.RemoveAt(0); 26 | desktop.MainWindow = new MainWindow 27 | { 28 | DataContext = new MainWindowViewModel(), 29 | Width = 600, 30 | Height = 450, 31 | WindowStartupLocation = WindowStartupLocation.CenterScreen, 32 | }; 33 | } 34 | 35 | base.OnFrameworkInitializationCompleted(); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.Demo/Views/MainWindow.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | 4 | namespace LoadingAnimation.Avalonia.Demo.Views 5 | { 6 | public partial class MainWindow : Window 7 | { 8 | public MainWindow() 9 | { 10 | InitializeComponent(); 11 | } 12 | 13 | private void ListBox_SelectionChanged(object? sender, SelectionChangedEventArgs e) 14 | { 15 | if (!IsLoaded) 16 | { 17 | return; 18 | } 19 | if (e.AddedItems[0] == null) 20 | { 21 | return; 22 | } 23 | 24 | var item = ((ContentControl)e.AddedItems[0]).Content.ToString(); 25 | switch (item) 26 | { 27 | case "The Classic": 28 | MainContent.Content = new ClassicPage(); 29 | break; 30 | case "The Dots": 31 | MainContent.Content = new DotsPage(); 32 | break; 33 | case "The Bars": 34 | MainContent.Content = new BarsPage(); 35 | break; 36 | case "The Spinner": 37 | MainContent.Content = new SpinnerPage(); 38 | break; 39 | case "The Progress": 40 | MainContent.Content = new ProgressPage(); 41 | break; 42 | default: 43 | break; 44 | } 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.Demo/Views/ClassicPage.axaml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Progress/Progress1.axaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 23 | 24 | 25 | 26 | 27 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Spinner/Spinner3.axaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 26 | 27 | 28 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Spinner/Spinner4.axaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 26 | 27 | 28 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Classic/Classic2.axaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 15 | 16 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Classic/Classic5.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Animation; 2 | using Avalonia; 3 | using Avalonia.Controls; 4 | using Avalonia.Controls.Primitives; 5 | using Avalonia.Media; 6 | using Avalonia.Styling; 7 | using LoadingAnimation.Avalonia.Animators; 8 | using System; 9 | 10 | namespace LoadingAnimation.Avalonia.Classic 11 | { 12 | public partial class Classic5 : ClassicBase 13 | { 14 | public Classic5() 15 | { 16 | InitializeComponent(); 17 | } 18 | 19 | protected override void OnApplyTemplate(TemplateAppliedEventArgs e) 20 | { 21 | base.OnApplyTemplate(e); 22 | 23 | var _animation = new Animation 24 | { 25 | Duration = TimeSpan.FromMicroseconds(2000), 26 | IterationCount = IterationCount.Infinite, 27 | SpeedRatio = 0.001, 28 | }; 29 | _animation.Children.Add(new KeyFrame() 30 | { 31 | Cue = new Cue(0.0), 32 | Setters = { new Setter { Property = ClipProperty, Value = new RectangleGeometry() { Rect = new Rect(new Size(0, 28)) } } } 33 | }); 34 | _animation.Children.Add(new KeyFrame() 35 | { 36 | Cue = new Cue(1.0), 37 | Setters = { new Setter { Property = ClipProperty, Value = new RectangleGeometry() { Rect = new Rect(new Size(100, 28)) } } } 38 | }); 39 | 40 | GeometryAnimator animator = new GeometryAnimator(); 41 | Animation.SetAnimator(_animation.Children[0].Setters[0], animator); 42 | Animation.SetAnimator(_animation.Children[1].Setters[0], animator); 43 | 44 | _animation.RunAsync(maskGrid); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Progress/Progress5.axaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.9.34714.143 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LoadingAnimation.Avalonia", "LoadingAnimation.Avalonia\LoadingAnimation.Avalonia.csproj", "{E84FD2D2-C5A9-49CA-9ACE-FEEB5FFDB397}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoadingAnimation.Avalonia.Demo", "LoadingAnimation.Avalonia.Demo\LoadingAnimation.Avalonia.Demo.csproj", "{7654C462-4DE9-4259-9524-C4670A47EDA6}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {E84FD2D2-C5A9-49CA-9ACE-FEEB5FFDB397}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {E84FD2D2-C5A9-49CA-9ACE-FEEB5FFDB397}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {E84FD2D2-C5A9-49CA-9ACE-FEEB5FFDB397}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {E84FD2D2-C5A9-49CA-9ACE-FEEB5FFDB397}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {7654C462-4DE9-4259-9524-C4670A47EDA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {7654C462-4DE9-4259-9524-C4670A47EDA6}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {7654C462-4DE9-4259-9524-C4670A47EDA6}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {7654C462-4DE9-4259-9524-C4670A47EDA6}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {E1021BBD-013A-4E0E-8E1A-E123E078E0C7} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.Demo/Views/MainWindow.axaml: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | The Classic 22 | The Dots 23 | The Bars 24 | The Spinner 25 | The Progress 26 | 27 | 28 | 29 | 30 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Animators/GeometryAnimator.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Animation; 3 | using Avalonia.Controls.Shapes; 4 | using Avalonia.Controls; 5 | using Avalonia.Media; 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Linq; 9 | using System.Text; 10 | using System.Threading.Tasks; 11 | 12 | namespace LoadingAnimation.Avalonia.Animators 13 | { 14 | public class GeometryAnimator : InterpolatingAnimator 15 | { 16 | public GeometryAnimator() 17 | { 18 | } 19 | 20 | public override Geometry Interpolate(double progress, Geometry oldValue, Geometry newValue) 21 | { 22 | if (oldValue is RectangleGeometry oldRect && newValue is RectangleGeometry newRect) 23 | { 24 | var radiusX = oldRect.Rect.Width + (newRect.Rect.Width - oldRect.Rect.Width) * progress; 25 | var radiusY = oldRect.Rect.Height + (newRect.Rect.Height - oldRect.Rect.Height) * progress; 26 | 27 | return new RectangleGeometry() { Rect = new Rect(0, 0, radiusX, radiusY) }; 28 | } 29 | else if (oldValue is EllipseGeometry oldEllipse && newValue is EllipseGeometry newEllipse) 30 | { 31 | var centerX = oldEllipse.Center.X + (newEllipse.Center.X - oldEllipse.Center.X) * progress; 32 | var centerY = oldEllipse.Center.Y + (newEllipse.Center.Y - oldEllipse.Center.Y) * progress; 33 | var radiusX = oldEllipse.RadiusX + (newEllipse.RadiusX - oldEllipse.RadiusX) * progress; 34 | var radiusY = oldEllipse.RadiusY + (newEllipse.RadiusY - oldEllipse.RadiusY) * progress; 35 | 36 | return new EllipseGeometry() { Center = new(centerX, centerY), RadiusX = radiusX, RadiusY = radiusY }; 37 | } 38 | 39 | 40 | return oldValue; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Classic/Classic4.axaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Progress/Progress6.axaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 26 | 27 | 35 | 36 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Progress/Progress2.axaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 23 | 24 | 25 | 26 | 32 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Spinner/Spinner2.axaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 26 | 27 | 35 | 36 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Classic/Classic1.axaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Classic/Classic8.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Animation; 2 | using Avalonia.Controls; 3 | using Avalonia.Controls.Primitives; 4 | using Avalonia.Media; 5 | using Avalonia.Styling; 6 | using LoadingAnimation.Avalonia.Animators; 7 | using System; 8 | using Avalonia; 9 | 10 | namespace LoadingAnimation.Avalonia.Classic 11 | { 12 | public partial class Classic8 : ClassicBase 13 | { 14 | public Classic8() 15 | { 16 | InitializeComponent(); 17 | } 18 | 19 | protected override void OnApplyTemplate(TemplateAppliedEventArgs e) 20 | { 21 | base.OnApplyTemplate(e); 22 | 23 | var _animation2 = new Animation 24 | { 25 | Duration = TimeSpan.FromMicroseconds(1500), 26 | IterationCount = IterationCount.Infinite, 27 | SpeedRatio = 0.001, 28 | 29 | }; 30 | _animation2.Children.Add(new KeyFrame() 31 | { 32 | Cue = new Cue(0.0), 33 | Setters = { new Setter { Property = ClipProperty, Value = new RectangleGeometry() { Rect = new Rect(0, 0, 100, 32) } } } 34 | }); 35 | _animation2.Children.Add(new KeyFrame() 36 | { 37 | Cue = new Cue(0.5), 38 | Setters = { new Setter { Property = ClipProperty, Value = new RectangleGeometry() { Rect = new Rect(0, 0, 0, 32) } } } 39 | }); 40 | _animation2.Children.Add(new KeyFrame() 41 | { 42 | Cue = new Cue(1.0), 43 | Setters = { new Setter { Property = ClipProperty, Value = new RectangleGeometry() { Rect = new Rect(0, 0, 100, 32) } } } 44 | }); 45 | 46 | GeometryAnimator animator2 = new GeometryAnimator(); 47 | Animation.SetAnimator(_animation2.Children[0].Setters[0], animator2); 48 | Animation.SetAnimator(_animation2.Children[1].Setters[0], animator2); 49 | Animation.SetAnimator(_animation2.Children[2].Setters[0], animator2); 50 | 51 | _animation2.RunAsync(maskGrid2); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Classic/Classic6.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Animation; 2 | using Avalonia; 3 | using Avalonia.Controls; 4 | using Avalonia.Controls.Primitives; 5 | using Avalonia.Media; 6 | using Avalonia.Styling; 7 | using LoadingAnimation.Avalonia.Animators; 8 | using System; 9 | 10 | namespace LoadingAnimation.Avalonia.Classic 11 | { 12 | public partial class Classic6 : ClassicBase 13 | { 14 | public Classic6() 15 | { 16 | InitializeComponent(); 17 | } 18 | 19 | protected override void OnApplyTemplate(TemplateAppliedEventArgs e) 20 | { 21 | base.OnApplyTemplate(e); 22 | 23 | var _animation = new Animation 24 | { 25 | Duration = TimeSpan.FromMicroseconds(2000), 26 | IterationCount = IterationCount.Infinite, 27 | SpeedRatio = 0.001, 28 | }; 29 | _animation.Children.Add(new KeyFrame() 30 | { 31 | Cue = new Cue(0.0), 32 | Setters = { new Setter { Property = ClipProperty, Value = new EllipseGeometry() { Center = new(12, 16), RadiusX = 12, RadiusY = 12 } } } 33 | }); 34 | _animation.Children.Add(new KeyFrame() 35 | { 36 | Cue = new Cue(0.5), 37 | Setters = { new Setter { Property = ClipProperty, Value = new EllipseGeometry() { Center = new(62, 16), RadiusX = 12, RadiusY = 12 } } } 38 | }); 39 | _animation.Children.Add(new KeyFrame() 40 | { 41 | Cue = new Cue(1.0), 42 | Setters = { new Setter { Property = ClipProperty, Value = new EllipseGeometry() { Center = new(12, 16), RadiusX = 12, RadiusY = 12 } } } 43 | }); 44 | 45 | GeometryAnimator animator = new GeometryAnimator(); 46 | Animation.SetAnimator(_animation.Children[0].Setters[0], animator); 47 | Animation.SetAnimator(_animation.Children[1].Setters[0], animator); 48 | Animation.SetAnimator(_animation.Children[2].Setters[0], animator); 49 | 50 | _animation.RunAsync(maskGrid); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia.Demo/LoadingAnimation.Avalonia.Demo.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | WinExe 4 | net8.0 5 | enable 6 | true 7 | app.manifest 8 | true 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | Designer 33 | 34 | 35 | 36 | 37 | 38 | %(Filename) 39 | 40 | 41 | %(Filename) 42 | 43 | 44 | %(Filename) 45 | 46 | 47 | Code 48 | %(Filename) 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Classic/Classic3.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Animation; 3 | using Avalonia.Animation.Easings; 4 | using Avalonia.Controls; 5 | using Avalonia.Controls.Primitives; 6 | using Avalonia.Input; 7 | using Avalonia.Media; 8 | using Avalonia.Styling; 9 | using LoadingAnimation.Avalonia.Animators; 10 | using System; 11 | 12 | namespace LoadingAnimation.Avalonia.Classic 13 | { 14 | public partial class Classic3 : ClassicBase 15 | { 16 | public Classic3() 17 | { 18 | InitializeComponent(); 19 | Loaded += Classic3_Loaded; 20 | } 21 | 22 | private void Classic3_Loaded(object? sender, global::Avalonia.Interactivity.RoutedEventArgs e) 23 | { 24 | } 25 | 26 | protected override void OnApplyTemplate(TemplateAppliedEventArgs e) 27 | { 28 | base.OnApplyTemplate(e); 29 | 30 | var _animation = new Animation 31 | { 32 | Duration = TimeSpan.FromMicroseconds(3000), 33 | IterationCount = IterationCount.Infinite, 34 | SpeedRatio = 0.001, 35 | }; 36 | _animation.Children.Add(new KeyFrame() 37 | { 38 | Cue = new Cue(0.0), 39 | Setters = { new Setter { Property = ClipProperty, Value = new RectangleGeometry() { Rect = new Rect(new Size(0, 20)) } } } 40 | }); 41 | _animation.Children.Add(new KeyFrame() 42 | { 43 | Cue = new Cue(0.6), 44 | Setters = { new Setter { Property = ClipProperty, Value = new RectangleGeometry() { Rect = new Rect(new Size(70, 20)) } } } 45 | }); 46 | _animation.Children.Add(new KeyFrame() 47 | { 48 | Cue = new Cue(1.0), 49 | Setters = { new Setter { Property = ClipProperty, Value = new RectangleGeometry() { Rect = new Rect(new Size(0, 20)) } } } 50 | }); 51 | 52 | GeometryAnimator animator = new GeometryAnimator(); 53 | Animation.SetAnimator(_animation.Children[0].Setters[0], animator); 54 | Animation.SetAnimator(_animation.Children[1].Setters[0], animator); 55 | Animation.SetAnimator(_animation.Children[2].Setters[0], animator); 56 | 57 | _animation.RunAsync(txtBlock); 58 | 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Classic/Classic9.axaml: -------------------------------------------------------------------------------- 1 | 10 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Spinner/Spinner1.axaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 26 | 41 | 42 | 49 | 50 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Spinner/Spinner5.axaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 27 | 28 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Bars/Bar1.axaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 26 | 41 | 56 | 57 | 58 | 62 | 66 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Dots/Dots5.axaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 32 | 50 | 51 | 52 | 56 | 57 | 58 | 59 | 60 | 64 | 65 | 66 | 67 | 68 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Dots/Dots2.axaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 26 | 44 | 62 | 63 | 64 | 68 | 72 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Dots/Dots1.axaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 29 | 47 | 65 | 66 | 67 | 71 | 75 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Dots/Dots4.axaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 25 | 39 | 53 | 54 | 55 | 59 | 60 | 61 | 62 | 63 | 67 | 68 | 69 | 70 | 71 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Bars/Bar2.axaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 26 | 41 | 56 | 57 | 58 | 62 | 63 | 64 | 65 | 66 | 70 | 71 | 72 | 73 | 74 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Dots/Dots3.axaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 29 | 47 | 65 | 66 | 67 | 71 | 75 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Bars/Bar3.axaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 26 | 41 | 56 | 57 | 62 | 63 | 64 | 65 | 69 | 70 | 71 | 72 | 73 | 77 | 78 | 79 | 80 | 81 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Progress/Progress4.axaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 23 | 35 | 36 | 37 | 42 | 43 | 44 | 45 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Progress/Progress3.axaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 26 | 44 | 62 | 80 | 95 | 96 | 97 | 98 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Bars/Bar4.axaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 36 | 62 | 88 | 89 | 94 | 95 | 96 | 97 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Classic/Classic7.axaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 29 | 44 | 59 | 74 | 89 | 104 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Oo]ut/ 33 | [Ll]og/ 34 | [Ll]ogs/ 35 | 36 | # Visual Studio 2015/2017 cache/options directory 37 | .vs/ 38 | # Uncomment if you have tasks that create the project's static files in wwwroot 39 | #wwwroot/ 40 | 41 | # Visual Studio 2017 auto generated files 42 | Generated\ Files/ 43 | 44 | # MSTest test Results 45 | [Tt]est[Rr]esult*/ 46 | [Bb]uild[Ll]og.* 47 | 48 | # NUnit 49 | *.VisualState.xml 50 | TestResult.xml 51 | nunit-*.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | 66 | # ASP.NET Scaffolding 67 | ScaffoldingReadMe.txt 68 | 69 | # StyleCop 70 | StyleCopReport.xml 71 | 72 | # Files built by Visual Studio 73 | *_i.c 74 | *_p.c 75 | *_h.h 76 | *.ilk 77 | *.meta 78 | *.obj 79 | *.iobj 80 | *.pch 81 | *.pdb 82 | *.ipdb 83 | *.pgc 84 | *.pgd 85 | *.rsp 86 | *.sbr 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.tmp_proj 92 | *_wpftmp.csproj 93 | *.log 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio LightSwitch build output 298 | **/*.HTMLClient/GeneratedArtifacts 299 | **/*.DesktopClient/GeneratedArtifacts 300 | **/*.DesktopClient/ModelManifest.xml 301 | **/*.Server/GeneratedArtifacts 302 | **/*.Server/ModelManifest.xml 303 | _Pvt_Extensions 304 | 305 | # Paket dependency manager 306 | .paket/paket.exe 307 | paket-files/ 308 | 309 | # FAKE - F# Make 310 | .fake/ 311 | 312 | # CodeRush personal settings 313 | .cr/personal 314 | 315 | # Python Tools for Visual Studio (PTVS) 316 | __pycache__/ 317 | *.pyc 318 | 319 | # Cake - Uncomment if you are using it 320 | # tools/** 321 | # !tools/packages.config 322 | 323 | # Tabs Studio 324 | *.tss 325 | 326 | # Telerik's JustMock configuration file 327 | *.jmconfig 328 | 329 | # BizTalk build output 330 | *.btp.cs 331 | *.btm.cs 332 | *.odx.cs 333 | *.xsd.cs 334 | 335 | # OpenCover UI analysis results 336 | OpenCover/ 337 | 338 | # Azure Stream Analytics local run output 339 | ASALocalRun/ 340 | 341 | # MSBuild Binary and Structured Log 342 | *.binlog 343 | 344 | # NVidia Nsight GPU debugger configuration file 345 | *.nvuser 346 | 347 | # MFractors (Xamarin productivity tool) working folder 348 | .mfractor/ 349 | 350 | # Local History for Visual Studio 351 | .localhistory/ 352 | 353 | # BeatPulse healthcheck temp database 354 | healthchecksdb 355 | 356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 357 | MigrationBackup/ 358 | 359 | # Ionide (cross platform F# VS Code tools) working folder 360 | .ionide/ 361 | 362 | # Fody - auto-generated XML schema 363 | FodyWeavers.xsd -------------------------------------------------------------------------------- /LoadingAnimation.Avalonia/Dots/Dots6.axaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 57 | 75 | 93 | 111 | 129 | 130 | 131 | 135 | 139 | 140 | 141 | 142 | 143 | 147 | 148 | 149 | 150 | 151 | 155 | 156 | 157 | 158 | 159 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | --------------------------------------------------------------------------------