Jumar Macato
6 years ago
No known key found for this signature in database
GPG Key ID: B19884DAC3A5BF3F
2 changed files with
14 additions and
15 deletions
-
samples/ControlCatalog/Pages/AutoCompleteBoxPage.xaml
-
src/Avalonia.Animation/AnimationInstance`1.cs
|
|
|
@ -3,26 +3,21 @@ |
|
|
|
xmlns:l="clr-namespace:ControlCatalog.Pages;assembly=ControlCatalog" |
|
|
|
x:Class="ControlCatalog.Pages.AutoCompleteBoxPage"> |
|
|
|
<l:AutoCompleteBoxPage.Styles> |
|
|
|
<Style Selector="l|AutoCompleteBoxPage[SideBarEnabled=False] Grid#sidebar"> |
|
|
|
<Style Selector="l|AutoCompleteBoxPage[SideBarEnabled=True] Grid#sidebar"> |
|
|
|
<Style.Animations> |
|
|
|
<Animation Duration="0:0:0.5" FillMode="Both" Easing="QuadraticEaseIn"> |
|
|
|
<!-- <KeyFrame Cue="0%"> |
|
|
|
<Setter Property="Width" Value="250" /> |
|
|
|
</KeyFrame> --> |
|
|
|
<Animation Duration="0:0:0.5" FillMode="Both" Easing="QuadraticEaseOut"> |
|
|
|
<KeyFrame Cue="100%"> |
|
|
|
<Setter Property="Width" Value="0" /> |
|
|
|
<Setter Property="Width" Value="250" /> |
|
|
|
</KeyFrame> |
|
|
|
</Animation> |
|
|
|
</Style.Animations> |
|
|
|
</Style> |
|
|
|
<Style Selector="l|AutoCompleteBoxPage[SideBarEnabled=True] Grid#sidebar"> |
|
|
|
<Style Selector="l|AutoCompleteBoxPage[SideBarEnabled=False] Grid#sidebar"> |
|
|
|
<Style.Animations> |
|
|
|
<Animation Duration="0:0:0.5" FillMode="Both" Easing="QuadraticEaseOut"> |
|
|
|
<!-- <KeyFrame Cue="0%"> |
|
|
|
<Setter Property="Width" Value="0" /> |
|
|
|
</KeyFrame> --> |
|
|
|
<Animation Duration="0:0:0.5" FillMode="Both" Easing="QuadraticEaseIn"> |
|
|
|
|
|
|
|
<KeyFrame Cue="100%"> |
|
|
|
<Setter Property="Width" Value="250" /> |
|
|
|
<Setter Property="Width" Value="0" /> |
|
|
|
</KeyFrame> |
|
|
|
</Animation> |
|
|
|
</Style.Animations> |
|
|
|
|
|
|
|
@ -119,9 +119,10 @@ namespace Avalonia.Animation |
|
|
|
{ |
|
|
|
if (_fillMode == FillMode.Backward || _fillMode == FillMode.Both) |
|
|
|
if (_currentIteration == 0) |
|
|
|
PublishNext(_firstKFValue); |
|
|
|
_targetControl.SetValue(_animator.Property, _firstKFValue, BindingPriority.LocalValue); |
|
|
|
|
|
|
|
else |
|
|
|
PublishNext(_lastInterpValue); |
|
|
|
_targetControl.SetValue(_animator.Property, _lastInterpValue, BindingPriority.LocalValue); |
|
|
|
} |
|
|
|
|
|
|
|
private void DoPlayStates() |
|
|
|
@ -151,11 +152,14 @@ namespace Avalonia.Animation |
|
|
|
if ((_fillMode == FillMode.Backward |
|
|
|
|| _fillMode == FillMode.Both) & indexTime == 0) |
|
|
|
{ |
|
|
|
DoDelay(); |
|
|
|
|
|
|
|
_targetControl.SetValue(_animator.Property, _neutralValue, BindingPriority.LocalValue); |
|
|
|
return; |
|
|
|
} |
|
|
|
else if (indexTime > 0 & indexTime <= initDelay) |
|
|
|
{ |
|
|
|
DoDelay(); |
|
|
|
return; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
|