Import functionality for wino accounts, calendar sync UI, bunch of shell improvements

This commit is contained in:
Burak Kaan Köse
2026-04-04 20:23:20 +02:00
parent 1667aa34db
commit 1d0fcfb5b0
68 changed files with 2792 additions and 519 deletions
@@ -0,0 +1,54 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
namespace Wino.Mail.WinUI.Controls;
public sealed partial class SyncAnimationControl : UserControl
{
public static readonly DependencyProperty IsPlayingProperty = DependencyProperty.Register(
nameof(IsPlaying),
typeof(bool),
typeof(SyncAnimationControl),
new PropertyMetadata(true, OnIsPlayingChanged));
public bool IsPlaying
{
get => (bool)GetValue(IsPlayingProperty);
set => SetValue(IsPlayingProperty, value);
}
public SyncAnimationControl()
{
InitializeComponent();
Loaded += OnLoaded;
}
private void OnLoaded(object sender, RoutedEventArgs e)
{
if (IsPlaying)
{
PlayAnimation();
}
}
private static void OnIsPlayingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var control = (SyncAnimationControl)d;
if ((bool)e.NewValue)
{
control.PlayAnimation();
}
else
{
control.AnimationPlayer.Stop();
}
}
private void PlayAnimation()
{
#pragma warning disable CS4014 // Fire-and-forget is intentional for looped animation playback.
AnimationPlayer.PlayAsync(0, 1, looped: true);
#pragma warning restore CS4014
}
}