Skip to content

Commit

Permalink
Merge pull request #17 from nacompllo/fix/BackgroundColorFromProgress…
Browse files Browse the repository at this point in the history
…RadialFixed

Fixed BackgroundColor issue from ProgressRadial
  • Loading branch information
jsuarezruiz authored Jun 1, 2022
2 parents 2d9df25 + 6db93be commit 32c050d
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/AlohaKit/Controls/ProgressRadial/ProgressRadial.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@ void AnimateProgress(int progress)
animation.Commit(this, "ProgressAngle", length: (uint)250);
}

public new static readonly BindableProperty BackgroundColorProperty =
BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(ProgressRadial), Colors.White,
propertyChanged: (bindableObject, oldValue, newValue) =>
{
if (newValue != null && bindableObject is ProgressRadial progressRadial)
{
progressRadial.UpdateBackgroundColor();
}
});

public new Color BackgroundColor
{
get => (Color)GetValue(BackgroundColorProperty);
set => SetValue(BackgroundColorProperty, value);
}

public static readonly BindableProperty StrokeColorProperty =
BindableProperty.Create(nameof(StrokeColor), typeof(Color), typeof(ProgressRadial), Colors.LightGray,
propertyChanged: (bindableObject, oldValue, newValue) =>
Expand All @@ -52,7 +68,6 @@ void AnimateProgress(int progress)
}
});


public Color StrokeColor
{
get => (Color)GetValue(StrokeColorProperty);
Expand Down

0 comments on commit 32c050d

Please sign in to comment.