Skip to content

Commit

Permalink
Merge pull request unoplatform#15727 from Youssef1313/composition-ani…
Browse files Browse the repository at this point in the history
…mation-improvements

chore: ExpressionAnimation improvements
  • Loading branch information
Youssef1313 authored Mar 4, 2024
2 parents 3166e25 + 104d50e commit a1a6402
Show file tree
Hide file tree
Showing 11 changed files with 484 additions and 186 deletions.
14 changes: 8 additions & 6 deletions src/Uno.UI.Composition/Composition/CompositionColorBrush.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,21 @@ public Color Color
set { SetProperty(ref _color, value); }
}

private protected override bool IsAnimatableProperty(ReadOnlySpan<char> propertyName)
internal override object GetAnimatableProperty(string propertyName, string subPropertyName)
{
if (propertyName is nameof(Color))
if (propertyName.Equals(nameof(Color), StringComparison.OrdinalIgnoreCase))
{
return true;
return GetColor(subPropertyName, Color);
}
else
{
return base.GetAnimatableProperty(propertyName, subPropertyName);
}

return base.IsAnimatableProperty(propertyName);
}

private protected override void SetAnimatableProperty(ReadOnlySpan<char> propertyName, ReadOnlySpan<char> subPropertyName, object? propertyValue)
{
if (propertyName is nameof(Color))
if (propertyName.Equals(nameof(Color), StringComparison.OrdinalIgnoreCase))
{
Color = UpdateColor(subPropertyName, Color, propertyValue);
}
Expand Down
Loading

0 comments on commit a1a6402

Please sign in to comment.