async public void HideBtnPanelAnimation() { Storyboard sb = new Storyboard(); StoryboardOperation.AddNewAnimation(sb, 1, 0, 0.3, 0.5, StoryboardOperation.EaseType.CubicEase, EasingMode.EaseIn, BtnPanel, "(Opacity)"); StoryboardOperation.AddNewAnimation(sb, 1, 0, 0.1, 0.5, StoryboardOperation.EaseType.CubicEase, EasingMode.EaseIn, SettingDdlBtn, "(Opacity)"); StoryboardOperation.AddNewAnimation(sb, 0, 25, 0.1, 0.5, StoryboardOperation.EaseType.BackEase, EasingMode.EaseIn, SettingDdlBtn, "(ContentControl.RenderTransform).(TranslateTransform.Y)"); StoryboardOperation.AddNewAnimation(sb, 1, 0, 0.2, 0.5, StoryboardOperation.EaseType.CubicEase, EasingMode.EaseIn, FlowDdlBtn, "(Opacity)"); StoryboardOperation.AddNewAnimation(sb, 0, 25, 0.2, 0.5, StoryboardOperation.EaseType.BackEase, EasingMode.EaseIn, FlowDdlBtn, "(ContentControl.RenderTransform).(TranslateTransform.Y)"); StoryboardOperation.AddNewAnimation(sb, 1, 0, 0.3, 0.5, StoryboardOperation.EaseType.CubicEase, EasingMode.EaseIn, DeleteDdlBtn, "(Opacity)"); StoryboardOperation.AddNewAnimation(sb, 0, 25, 0.3, 0.5, StoryboardOperation.EaseType.BackEase, EasingMode.EaseIn, DeleteDdlBtn, "(ContentControl.RenderTransform).(TranslateTransform.Y)"); sb.Begin(this); isDeleteComfirmed = false; await Task.Delay(800); PackIcon icon = new PackIcon(); icon.Kind = PackIconKind.Delete; icon.Height = 24; icon.Width = 24; DeleteDdlBtn.Content = icon; BtnPanel.Visibility = Visibility.Hidden; }
public void FocusSingleDdlAnimation() { Storyboard sb = new Storyboard(); StoryboardOperation.AddNewAnimation(sb, 0.5, 1, 0, 0.5, StoryboardOperation.EaseType.CubicEase, EasingMode.EaseOut, DdlBackground, "(Opacity)"); StoryboardOperation.AddNewAnimation(sb, 0, 1, 0, 0.5, StoryboardOperation.EaseType.CubicEase, EasingMode.EaseOut, DdlBackground, "(Grid.Effect).(DropShadowEffect.Opacity)"); sb.Begin(this); }
private void UncheckBtnAnimation(DependencyObject icon, TextBlock tb) { Storyboard sb = new Storyboard(); StoryboardOperation.AddNewAnimation(sb, 1, 0, 0, 0.5, StoryboardOperation.EaseType.CubicEase, EasingMode.EaseOut, icon, "(Opacity)"); StoryboardOperation.AddNewAnimation(sb, 0, -30, 0, 0.5, StoryboardOperation.EaseType.CubicEase, EasingMode.EaseOut, tb, "(ContentControl.RenderTransform).(TranslateTransform.X)"); sb.Begin(this); }
public void UnfocusSingleDdlAnimation() { Storyboard sb = new Storyboard(); StoryboardOperation.AddNewAnimation(sb, 1, 0.5, 0, 0.5, StoryboardOperation.EaseType.CubicEase, EasingMode.EaseOut, DdlBackground, "(Opacity)"); StoryboardOperation.AddNewAnimation(sb, 1, 0, 0, 0.5, StoryboardOperation.EaseType.CubicEase, EasingMode.EaseOut, DdlBackground, "(Grid.Effect).(DropShadowEffect.Opacity)"); if (BtnPanel.IsVisible) { HideBtnPanelAnimation(); } sb.Begin(this); }
private void OpenAnimation() { Storyboard sb = new Storyboard(); int i = 1; foreach (DependencyObject item in sp.Children) { StoryboardOperation.AddNewAnimation(sb, 100, 0, 0.1 * i, 1, StoryboardOperation.EaseType.CubicEase, EasingMode.EaseOut, item, "(RenderTransform).(TranslateTransform.Y)"); StoryboardOperation.AddNewAnimation(sb, 0, 1, 0.1 * i, 1, StoryboardOperation.EaseType.CubicEase, EasingMode.EaseOut, item, "(Opacity)"); i++; } sb.Begin(this); }
public void ShowBtnPanelAnimation() { BtnPanel.Visibility = Visibility.Visible; Storyboard sb = new Storyboard(); StoryboardOperation.AddNewAnimation(sb, 0, 1, 0, 0.5, StoryboardOperation.EaseType.CubicEase, EasingMode.EaseOut, BtnPanel, "(Opacity)"); StoryboardOperation.AddNewAnimation(sb, 0, 1, 0.1, 0.5, StoryboardOperation.EaseType.CubicEase, EasingMode.EaseOut, SettingDdlBtn, "(Opacity)"); StoryboardOperation.AddNewAnimation(sb, 25, 0, 0.1, 0.5, StoryboardOperation.EaseType.BackEase, EasingMode.EaseOut, SettingDdlBtn, "(ContentControl.RenderTransform).(TranslateTransform.Y)"); StoryboardOperation.AddNewAnimation(sb, 0, 1, 0.2, 0.5, StoryboardOperation.EaseType.CubicEase, EasingMode.EaseOut, FlowDdlBtn, "(Opacity)"); StoryboardOperation.AddNewAnimation(sb, 25, 0, 0.2, 0.5, StoryboardOperation.EaseType.BackEase, EasingMode.EaseOut, FlowDdlBtn, "(ContentControl.RenderTransform).(TranslateTransform.Y)"); StoryboardOperation.AddNewAnimation(sb, 0, 1, 0.3, 0.5, StoryboardOperation.EaseType.CubicEase, EasingMode.EaseOut, DeleteDdlBtn, "(Opacity)"); StoryboardOperation.AddNewAnimation(sb, 25, 0, 0.3, 0.5, StoryboardOperation.EaseType.BackEase, EasingMode.EaseOut, DeleteDdlBtn, "(ContentControl.RenderTransform).(TranslateTransform.Y)"); sb.Begin(this); }
private int AddAnimationToItem(Storyboard sb, int num, FrameworkElement parent) { if (parent.Opacity == 0) { StoryboardOperation.AddNewAnimation(sb, 100, 0, 0.1 * num, 1, StoryboardOperation.EaseType.CubicEase, EasingMode.EaseOut, parent, "(RenderTransform).(TranslateTransform.Y)"); StoryboardOperation.AddNewAnimation(sb, 0, 1, 0.1 * num, 1, StoryboardOperation.EaseType.CubicEase, EasingMode.EaseOut, parent, "(Opacity)"); num++; } if (parent.GetType().IsSubclassOf(typeof(Panel))) { foreach (FrameworkElement child in (parent as Panel).Children) { num = AddAnimationToItem(sb, num, child); } } return(num); }
public void UnloadSingleDdlAnimation(Storyboard sb, int i) { StoryboardOperation.AddNewAnimation(sb, 1, 0, 0.1 * i, 1, StoryboardOperation.EaseType.CubicEase, EasingMode.EaseIn, Container, "(Opacity)"); StoryboardOperation.AddNewAnimation(sb, 0, 150, 0.1 * i, 1, StoryboardOperation.EaseType.CubicEase, EasingMode.EaseIn, Container, "(RenderTransform).(TranslateTransform.X)"); StoryboardOperation.AddNewAnimation(sb, 1, 0, 0.1 * i + 1, 1, StoryboardOperation.EaseType.CubicEase, EasingMode.EaseIn, ProgressRect, "(RenderTransform).(ScaleTransform.ScaleX)"); }