Browse Source
Merge branch 'master' into fix-renderdemo-xaml
pull/2041/head
Jumar Macato
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
0 deletions
-
src/Avalonia.Animation/AnimatorKeyFrame.cs
|
|
|
@ -61,6 +61,10 @@ namespace Avalonia.Animation |
|
|
|
{ |
|
|
|
throw new ArgumentNullException($"KeyFrame value can't be null."); |
|
|
|
} |
|
|
|
if(Value is T typedValue) |
|
|
|
{ |
|
|
|
return typedValue; |
|
|
|
} |
|
|
|
if (!typeConv.CanConvertTo(Value.GetType())) |
|
|
|
{ |
|
|
|
throw new InvalidCastException($"KeyFrame value doesnt match property type."); |
|
|
|
|