1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-27 05:33:23 +00:00

PM-3349 PM-3350 MAUI Migration Initial

This commit is contained in:
Federico Maccaroni
2023-09-29 11:02:19 -03:00
parent bbef0f8c93
commit 8ef9443b1e
717 changed files with 5367 additions and 4702 deletions

View File

@@ -0,0 +1,23 @@
namespace Bit.App.Utilities
{
public static class ProgressBarExtensions
{
public static BindableProperty AnimatedProgressProperty =
BindableProperty.CreateAttached("AnimatedProgress",
typeof(double),
typeof(ProgressBar),
0.0d,
BindingMode.OneWay,
propertyChanged: (b, o, n) => ProgressBarProgressChanged((ProgressBar)b, (double)n));
public static double GetAnimatedProgress(BindableObject target) => (double)target.GetValue(AnimatedProgressProperty);
public static void SetAnimatedProgress(BindableObject target, double value) => target.SetValue(AnimatedProgressProperty, value);
private static void ProgressBarProgressChanged(ProgressBar progressBar, double progress)
{
Microsoft.Maui.Controls.ViewExtensions.CancelAnimations(progressBar);
progressBar.ProgressTo(progress, 500, Easing.SinIn);
}
}
}