private void AntGrid(Grid g) { g.Width = 5; g.Height = 5; g.Visibility = Visibility.Visible; Storyboard sb = new Storyboard(); DoubleAnimation da = new DoubleAnimation(5.0, gridmain.ActualWidth - 10, new Duration(TimeSpan.FromSeconds(2))); DoubleAnimation da1 = new DoubleAnimation(5.0, gridmain.RowDefinitions[0].ActualHeight - 10, new Duration(TimeSpan.FromSeconds(2))); DoubleAnimation da2 = new DoubleAnimation(0, 720, new Duration(TimeSpan.FromSeconds(2))); TransformGroup tg = new TransformGroup(); RotateTransform rt = new RotateTransform(720); tg.Children.Add(rt); g.RenderTransform = tg; g.RenderTransformOrigin = new Point(0.5, 0.5); Storyboard.SetTarget(da2, g); Storyboard.SetTargetProperty(da2, new PropertyPath("(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)"));//RotateTransform.AngleProperty sb.Children.Add(da2); Storyboard.SetTarget(da, g); Storyboard.SetTargetProperty(da, new PropertyPath(Grid.WidthProperty)); sb.Children.Add(da); Storyboard.SetTarget(da1, g); Storyboard.SetTargetProperty(da1, new PropertyPath(Grid.HeightProperty)); sb.Children.Add(da1); if (!Resources.Contains("ShowAn")) Resources.Add("ShowAn", sb); sb.AccelerationRatio = 1.0; sb.Begin(); }
void InitializeNotificationBar() { _storyboard = new Storyboard(); _storyboard.Completed += _storyboard_Completed; var animation0 = new DoubleAnimation(1, new Duration(TimeSpan.FromSeconds(0.1))); Storyboard.SetTarget(animation0, notify_br); Storyboard.SetTargetProperty(animation0, new PropertyPath(Border.OpacityProperty)); _storyboard.Children.Add(animation0); var animation = new DoubleAnimation(0, new Duration(TimeSpan.FromSeconds(0.5))); animation.EasingFunction = new CircleEase { EasingMode = EasingMode.EaseOut }; Storyboard.SetTarget(animation, notify_br); Storyboard.SetTargetProperty(animation, new PropertyPath("(Border.RenderTransform).Y")); _storyboard.Children.Add(animation); var animation2 = new DoubleAnimation(40, new Duration(TimeSpan.FromSeconds(0.5))); animation2.BeginTime = TimeSpan.FromSeconds(3); animation2.EasingFunction = new CircleEase { EasingMode = EasingMode.EaseIn }; Storyboard.SetTarget(animation2, notify_br); Storyboard.SetTargetProperty(animation2, new PropertyPath("(Border.RenderTransform).Y")); _storyboard.Children.Add(animation2); var animation3 = new DoubleAnimation(0, new Duration(TimeSpan.Zero)); animation3.BeginTime = TimeSpan.FromSeconds(3.5); Storyboard.SetTarget(animation3, notify_br); Storyboard.SetTargetProperty(animation3, new PropertyPath(Border.OpacityProperty)); _storyboard.Children.Add(animation3); }
public ReplayPage() { InitializeComponent(); Download.Visibility = Visibility.Hidden; if (!Directory.Exists(Path.Combine(Client.ExecutingDirectory, "cabinet"))) Directory.CreateDirectory(Path.Combine(Client.ExecutingDirectory, "cabinet")); var waitAnimation = new DoubleAnimation(0, TimeSpan.FromSeconds(0.5)); waitAnimation.Completed += (o, e) => { var showAnimation = new DoubleAnimation(1, TimeSpan.FromSeconds(0.5)); }; Command.TextChanged += Command_TextChanged; #region Register Context context = new SerializationContext(); context.Register(typeof(EndOfReplayGameStats)); context.Register(typeof(ReplayParticipantStatsSummary)); context.Register(typeof(ReplayRawStatDTO)); #endregion Register Context UpdateReplays(); }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/%E5%A5%A5%E6%9E%AB%E7%87%83%E6%B0%94%E8%90%A5%E6%94%B6%E7%B3%BB%E7%BB%9FV3;compo" + "nent/MainPage.xaml", System.UriKind.Relative)); this.mainpage = ((System.Windows.Controls.UserControl)(this.FindName("mainpage"))); this.MainCanvasStoryboardIn = ((System.Windows.Media.Animation.Storyboard)(this.FindName("MainCanvasStoryboardIn"))); this.MainCanvasStoryboardOut = ((System.Windows.Media.Animation.Storyboard)(this.FindName("MainCanvasStoryboardOut"))); this.MainCanvasrightStoryboardIn = ((System.Windows.Media.Animation.Storyboard)(this.FindName("MainCanvasrightStoryboardIn"))); this.MainCanvasrightStoryboardOut = ((System.Windows.Media.Animation.Storyboard)(this.FindName("MainCanvasrightStoryboardOut"))); this.CanvasBottomStoryboard = ((System.Windows.Media.Animation.Storyboard)(this.FindName("CanvasBottomStoryboard"))); this.da = ((System.Windows.Media.Animation.DoubleAnimation)(this.FindName("da"))); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.openchild = ((Com.Aote.ObjectTools.ChildWindowObj)(this.FindName("openchild"))); this.selects = ((Com.Aote.ObjectTools.ObjectList)(this.FindName("selects"))); this.canvasleft = ((System.Windows.Controls.Canvas)(this.FindName("canvasleft"))); this.canvasbottom = ((System.Windows.Controls.Canvas)(this.FindName("canvasbottom"))); this.frame = ((System.Windows.Controls.Grid)(this.FindName("frame"))); this.menus = ((Microsoft.Expression.Controls.PathListBox)(this.FindName("menus"))); this.plblp = ((Microsoft.Expression.Controls.LayoutPath)(this.FindName("plblp"))); this.path = ((System.Windows.Shapes.Path)(this.FindName("path"))); this.loginUserInfo = ((System.Windows.Controls.Canvas)(this.FindName("loginUserInfo"))); }
private async void SlideIn() { Opacity = 1.0; var workingArea = Screen.PrimaryScreen.WorkingArea; var aTop = new DoubleAnimation { From = workingArea.Bottom + Height, To = (workingArea.Bottom - Height) - 5.0, Duration = new Duration(TimeSpan.FromSeconds(0.5)) }; var aBottom = new DoubleAnimation { To = (workingArea.Bottom + Height) + 5.0, Duration = new Duration(TimeSpan.FromSeconds(0.5)) }; var storyboard = new Storyboard(); storyboard.Children.Add(aTop); Storyboard.SetTarget(aTop, this); Storyboard.SetTargetProperty(aTop, new PropertyPath(TopProperty)); await Extensions.BeginAsync(storyboard); await Task.Delay(0xbb8); storyboard.Children.Clear(); storyboard.Children.Add(aBottom); Storyboard.SetTarget(aBottom, this); Storyboard.SetTargetProperty(aBottom, new PropertyPath(TopProperty)); await Extensions.BeginAsync(storyboard); Close(); }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/AnalogClock;component/MainPage.xaml", System.UriKind.Relative)); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.TitlePanel = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel"))); this.ApplicationTitle = ((System.Windows.Controls.TextBlock)(this.FindName("ApplicationTitle"))); this.PageTitle = ((System.Windows.Controls.TextBlock)(this.FindName("PageTitle"))); this.ContentGrid = ((System.Windows.Controls.Grid)(this.FindName("ContentGrid"))); this.ClockFaceEllipse = ((System.Windows.Shapes.Ellipse)(this.FindName("ClockFaceEllipse"))); this.ClockHandsCanvas = ((System.Windows.Controls.Canvas)(this.FindName("ClockHandsCanvas"))); this.ClockStoryboard = ((System.Windows.Media.Animation.Storyboard)(this.FindName("ClockStoryboard"))); this.HourAnimation = ((System.Windows.Media.Animation.DoubleAnimation)(this.FindName("HourAnimation"))); this.MinuteAnimation = ((System.Windows.Media.Animation.DoubleAnimation)(this.FindName("MinuteAnimation"))); this.SecondAnimation = ((System.Windows.Media.Animation.DoubleAnimation)(this.FindName("SecondAnimation"))); this.SecondHandTransform = ((System.Windows.Media.RotateTransform)(this.FindName("SecondHandTransform"))); this.MinuteHandTransform = ((System.Windows.Media.RotateTransform)(this.FindName("MinuteHandTransform"))); this.HourHandTransform = ((System.Windows.Media.RotateTransform)(this.FindName("HourHandTransform"))); this.txtdt = ((System.Windows.Controls.TextBlock)(this.FindName("txtdt"))); this.txtdt1 = ((System.Windows.Controls.TextBlock)(this.FindName("txtdt1"))); }
public Paddle() { // Sets up the body part's shape. this.Shape = new Polygon { HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Top, StrokeThickness = 3.0, Opacity = 1.0, Fill = Brushes.Orange, Stroke = Brushes.Black }; this.state = PaddleState.PreGame; // Sets up the appear animation. this.AppearAnimation = new Storyboard(); DoubleAnimation da = new DoubleAnimation(1.0, new Duration(Paddle.AppearAnimationDuration)); Storyboard.SetTarget(da, this.Shape); Storyboard.SetTargetProperty(da, new PropertyPath(Polygon.OpacityProperty)); this.AppearAnimation.Children.Add(da); // Sets up the hit animation. this.FillAnimation = new Storyboard(); ColorAnimation ca = new ColorAnimation(Colors.Red, Colors.Orange, new Duration(Paddle.HitAnimationDuration)); Storyboard.SetTarget(ca, this.Shape); Storyboard.SetTargetProperty(ca, new PropertyPath("Fill.Color", new object[] { Polygon.FillProperty, SolidColorBrush.ColorProperty })); this.FillAnimation.Children.Add(ca); this.State = PaddleState.PreGame; }
private static void DarkenPropertyChangedCallback(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs) { var uiElement = dependencyObject as UIElement; var dropShadowEffect = uiElement?.Effect as DropShadowEffect; if (dropShadowEffect == null) return; if ((bool) dependencyPropertyChangedEventArgs.NewValue) { SetLocalInfo(dependencyObject, new ShadowLocalInfo(dropShadowEffect.Opacity)); var doubleAnimation = new DoubleAnimation(1, new Duration(TimeSpan.FromMilliseconds(350))) { FillBehavior = FillBehavior.HoldEnd }; dropShadowEffect.BeginAnimation(DropShadowEffect.OpacityProperty, doubleAnimation); } else { var shadowLocalInfo = GetLocalInfo(dependencyObject); if (shadowLocalInfo == null) return; var doubleAnimation = new DoubleAnimation(shadowLocalInfo.StandardOpacity, new Duration(TimeSpan.FromMilliseconds(350))) { FillBehavior = FillBehavior.HoldEnd }; dropShadowEffect.BeginAnimation(DropShadowEffect.OpacityProperty, doubleAnimation); } }
private void CloseCommitDetails_Executed(object sender, ExecutedRoutedEventArgs e) { try { if (e.Parameter == null) { var animationDuration = TimeSpan.FromSeconds(.2); var animation = new DoubleAnimation(this.ActualWidth + 200, new Duration(animationDuration)); animation.EasingFunction = new CubicEase() { EasingMode = EasingMode.EaseIn }; animation.Completed += (o, _) => this.details.Visibility = Visibility.Collapsed; this.details.RenderTransform.BeginAnimation(TranslateTransform.XProperty, animation); } else { var animationDuration = TimeSpan.FromSeconds(.2); var animation = new DoubleAnimation(-this.ActualWidth, new Duration(animationDuration)); animation.EasingFunction = new CubicEase() { EasingMode = EasingMode.EaseIn }; animation.Completed += (o, _) => this.pendingChanges.Visibility = Visibility.Collapsed; this.pendingChanges.RenderTransform.BeginAnimation(TranslateTransform.XProperty, animation); } } catch (Exception ex) { Log.WriteLine("MainWindow.CloseCommitDetails_Executed: {0}", ex.ToString()); } }
/// <summary> /// Starts an animation to a particular value on the specified dependency property. /// You can pass in an event handler to call when the animation has completed. /// </summary> public static void StartAnimation(UIElement animatableElement, DependencyProperty dependencyProperty, double toValue, double animationDurationSeconds, EventHandler completedEvent) { double fromValue = (double)animatableElement.GetValue(dependencyProperty); DoubleAnimation animation = new DoubleAnimation(); animation.From = fromValue; animation.To = toValue; animation.Duration = TimeSpan.FromSeconds(animationDurationSeconds); animation.Completed += delegate(object sender, EventArgs e) { // // When the animation has completed bake final value of the animation // into the property. // animatableElement.SetValue(dependencyProperty, animatableElement.GetValue(dependencyProperty)); CancelAnimation(animatableElement, dependencyProperty); if (completedEvent != null) { completedEvent(sender, e); } }; animation.Freeze(); animatableElement.BeginAnimation(dependencyProperty, animation); }
private void CompareCommits_Executed(object sender, ExecutedRoutedEventArgs e) { try { this.details.RenderTransform.SetValue(TranslateTransform.XProperty, this.ActualWidth); this.details.Visibility = Visibility.Visible; var animationDuration = TimeSpan.FromSeconds(.5); var animation = new DoubleAnimation(0, new Duration(animationDuration)); animation.EasingFunction = new CubicEase() { EasingMode = EasingMode.EaseOut }; loading.Visibility = Visibility.Visible; animation.Completed += (_, x) => { var ids = e.Parameter as string[]; this.details.Show(this.gitViewModel.Tracker, ids[0], ids[1]); loading.Visibility = Visibility.Collapsed; }; this.details.RenderTransform.BeginAnimation(TranslateTransform.XProperty, animation); } catch (Exception ex) { Log.WriteLine("MainWindow.CompareCommits_Executed {0}", ex.ToString()); } }
private void PerformCaptureAnimation() { LoadingView.Text = "Processing ..."; ShowLoadingView(); curtain = new Rectangle(); curtain.Fill = new SolidColorBrush(Colors.White); LayoutRoot.Children.Add(curtain); Storyboard animation = new Storyboard(); Duration duration = new Duration(TimeSpan.FromSeconds(0.3)); animation.Duration = duration; DoubleAnimation curtainAnimation = new DoubleAnimation(); animation.Children.Add(curtainAnimation); curtainAnimation.Duration = duration; curtainAnimation.To = 0; curtainAnimation.EasingFunction = new CubicEase() { EasingMode = EasingMode.EaseIn }; Storyboard.SetTarget(curtainAnimation, curtain); Storyboard.SetTargetProperty(curtainAnimation, new PropertyPath("Opacity")); animation.Completed += (sender, e) => { LayoutRoot.Children.Remove(curtain); }; animation.Begin(); }
private RuntimeSetterTransition(IAnimator animator, RuntimeTransitionPool pool) { _releaseAction = Release; _animator = animator; _pool = pool; var doubleAnimation = new DoubleAnimation { From = 0.0, To = 1.0 }; Storyboard.SetTarget(doubleAnimation, this); Storyboard.SetTargetProperty(doubleAnimation, new PropertyPath(ProgressProperty)); _storyboard = new Storyboard { Children = { doubleAnimation } }; _storyboard.Begin(); _storyboard.Stop(); _storyboard.Completed += (sender, args) => OnCompleted(true); }
/// <summary> /// 登录窗体逐渐缩小动画 /// </summary> private void BeginEnterAnimation() { NameScope.SetNameScope(this, new NameScope()); ScaleTransform st = this.RenderTransform as ScaleTransform; this.RegisterName("scale", st); Storyboard sb = new Storyboard(); sb.Completed += (s, e) => { this.Hide(); new MainWindow().Show(); }; DoubleAnimation daX = new DoubleAnimation(); daX.To = 0; daX.Duration = TimeSpan.FromSeconds(0.3); DoubleAnimation daY = new DoubleAnimation(); daY.To = 0; daY.Duration = TimeSpan.FromSeconds(0.3); Storyboard.SetTargetName(daX, "scale"); Storyboard.SetTargetProperty(daX, new PropertyPath(ScaleTransform.ScaleXProperty)); Storyboard.SetTargetName(daY, "scale"); Storyboard.SetTargetProperty(daY, new PropertyPath(ScaleTransform.ScaleYProperty)); sb.Children.Add(daX); sb.Children.Add(daY); sb.Begin(this); //ST.BeginAnimation(ScaleTransform.ScaleXProperty, new DoubleAnimation(0, new Duration(TimeSpan.FromSeconds(1)))); //ST.BeginAnimation(ScaleTransform.ScaleYProperty, new DoubleAnimation(0, new Duration(TimeSpan.FromSeconds(1)))); }
internal void fade(bool fadein) { // Create a storyboard to contain the animations. storyboard = new Storyboard(); TimeSpan duration = new TimeSpan(0, 0, 1); // Create a DoubleAnimation to fade the not selected option control DoubleAnimation animation = new DoubleAnimation(); if (fadein) { animation.From = 0.0; animation.To = 1.0; } else { animation.From = 1.0; animation.To = 0.0; } animation.Duration = new Duration(duration); // Configure the animation to target de property Opacity Storyboard.SetTargetName(animation, this.uiImage.Name); Storyboard.SetTargetProperty(animation, new PropertyPath(Image.OpacityProperty)); // Add the animation to the storyboard storyboard.Children.Add(animation); // Begin the storyboard storyboard.Begin(this.uiImage); }
private void btnRadiusAnimation_Click(object sender, RoutedEventArgs e) { DoubleAnimation animation = new DoubleAnimation(200, new Duration(TimeSpan.FromSeconds(5))); animation.AutoReverse = true; myEllipse.BeginAnimation(WidthProperty, animation); myEllipse.BeginAnimation(HeightProperty, animation); }
private void AnimateEntry(Size targetSize) { var svi = GuiHelpers.GetParentObject<ScatterViewItem>(this, false); if (svi != null) { // Easing function provide a more natural animation IEasingFunction ease = new BackEase {EasingMode = EasingMode.EaseOut, Amplitude = 0.3}; var duration = new Duration(TimeSpan.FromMilliseconds(500)); var w = new DoubleAnimation(0.0, targetSize.Width, duration) {EasingFunction = ease}; var h = new DoubleAnimation(0.0, targetSize.Height, duration) {EasingFunction = ease}; var o = new DoubleAnimation(0.0, 1.0, duration); // Remove the animation after it has completed so that its possible to manually resize the scatterviewitem w.Completed += (s, e) => svi.BeginAnimation(ScatterViewItem.WidthProperty, null); h.Completed += (s, e) => svi.BeginAnimation(ScatterViewItem.HeightProperty, null); // Set the size manually, otherwise once the animation is removed the size will revert back to the minimum size // Since animation has higher priority for DP's, this setting won't have effect until the animation is removed svi.Width = targetSize.Width; svi.Height = targetSize.Height; svi.BeginAnimation(ScatterViewItem.WidthProperty, w); svi.BeginAnimation(ScatterViewItem.HeightProperty, h); svi.BeginAnimation(ScatterViewItem.OpacityProperty, o); } }
public static void AnimateScrollIntoViewMainMenu(this ItemsControl itemsControl, object item) { try { ScrollViewer scrollViewer = VisualTreeHelpers.GetVisualChild<ScrollViewer>(itemsControl); UIElement container = itemsControl.ItemContainerGenerator.ContainerFromItem(item) as UIElement; int index = itemsControl.ItemContainerGenerator.IndexFromContainer(container); double toValue = scrollViewer.ExtentWidth * ((double)index / itemsControl.Items.Count); Point relativePoint = container.TranslatePoint(new Point(0.0, 0.0), Window.GetWindow(container)); DoubleAnimation horizontalAnimation = new DoubleAnimation(); horizontalAnimation.From = scrollViewer.HorizontalOffset; horizontalAnimation.To = toValue; horizontalAnimation.DecelerationRatio = .2; horizontalAnimation.Duration = new Duration(TimeSpan.FromMilliseconds(1000)); Storyboard storyboard = new Storyboard(); storyboard.Children.Add(horizontalAnimation); Storyboard.SetTarget(horizontalAnimation, scrollViewer); Storyboard.SetTargetProperty(horizontalAnimation, new PropertyPath(ScrollViewerBehavior.HorizontalOffsetProperty)); storyboard.Begin(); } catch (Exception) { } }
void animating3_Completed(object sender, EventArgs e) { if(MainWindow.stopGesture) { myText.Content = " 2"; var animation2Opacity = new DoubleAnimation(); animation2Opacity.From = 1.0; animation2Opacity.To = 0; animation2Opacity.Duration = new Duration(TimeSpan.FromMilliseconds(1000)); Storyboard.SetTarget(animation2Opacity, myText); Storyboard.SetTargetProperty(animation2Opacity, new PropertyPath(UIElement.OpacityProperty)); Storyboard animating2 = new Storyboard(); animating2.Children.Add(animation2Opacity); animating2.Completed += animating2_Completed; animating2.Begin(); } else { myText.Visibility = Visibility.Collapsed; animationStarted = false; } }
static Tilt() { tiltStoryboard = new Storyboard(); untiltStoryboard = new Storyboard(); depressAnimation = new DoubleAnimation { From = 0, Duration = TimeSpan.FromSeconds(.05) }; Storyboard.SetTargetProperty(depressAnimation, new PropertyPath("(FrameworkElement.Projection).(PlaneProjection.GlobalOffsetZ)")); tiltStoryboard.Children.Add(depressAnimation); rotationXAnimation = new DoubleAnimation { From = 0, Duration = TimeSpan.FromSeconds(.05) }; Storyboard.SetTargetProperty(rotationXAnimation, new PropertyPath("(FrameworkElement.Projection).(PlaneProjection.RotationX)")); tiltStoryboard.Children.Add(rotationXAnimation); rotationYAnimation = new DoubleAnimation { From = 0, Duration = TimeSpan.FromSeconds(.05) }; Storyboard.SetTargetProperty(rotationYAnimation, new PropertyPath("(FrameworkElement.Projection).(PlaneProjection.RotationY)")); tiltStoryboard.Children.Add(rotationYAnimation); DoubleAnimation animation = new DoubleAnimation { To = 0, Duration = TimeSpan.FromSeconds(.05) }; Storyboard.SetTargetProperty(animation, new PropertyPath("(FrameworkElement.Projection).(PlaneProjection.GlobalOffsetZ)")); untiltStoryboard.Children.Add(animation); animation = new DoubleAnimation { To = 0, Duration = TimeSpan.FromSeconds(.05) }; Storyboard.SetTargetProperty(animation, new PropertyPath("(FrameworkElement.Projection).(PlaneProjection.RotationX)")); untiltStoryboard.Children.Add(animation); animation = new DoubleAnimation { To = 0, Duration = TimeSpan.FromSeconds(.05) }; Storyboard.SetTargetProperty(animation, new PropertyPath("(FrameworkElement.Projection).(PlaneProjection.RotationY)")); untiltStoryboard.Children.Add(animation); }
public CalibrationWpf(Screen current) { InitializeComponent(); screen = current; // Create the calibration target calibrationPointWpf = new CalibrationPointWpf(new Size(screen.Bounds.Width, screen.Bounds.Height)); CalibrationCanvas.Children.Add(calibrationPointWpf); Opacity = 0; IsAborted = false; // Create the animation-out object and close form when completed animateOut = new DoubleAnimation(0, TimeSpan.FromSeconds(FADE_OUT_TIME)) { From = 1.0, To = 0.0, AutoReverse = false }; animateOut.Completed += delegate { Close(); }; }
public static void CarDeploymentAnimation(ToggleButton btnExpand, Grid SecondPanel, Grid rootPanel, TabItem tabContent_1, TabItem tabContent_2) { System.Windows.Media.Animation.DoubleAnimation ta = new System.Windows.Media.Animation.DoubleAnimation(); ta.EasingFunction = new BackEase() { EasingMode = EasingMode.EaseInOut }; if (btnExpand.IsChecked == true) { ta.To = rootPanel.ActualWidth - (11); ta.Duration = (Duration)Application.Current.Resources["TInOutDuration"]; SecondPanel.BeginAnimation(Grid.WidthProperty, ta); tabContent_1.Width = rootPanel.ActualWidth / 2 - 10; tabContent_2.Width = rootPanel.ActualWidth / 2 - 12; } else { ta.Completed += (a, b) => { tabContent_1.Width = 175; tabContent_2.Width = 175; }; ta.To = 360; ta.Duration = (Duration)Application.Current.Resources["TInOutDuration"]; SecondPanel.BeginAnimation(Grid.WidthProperty, ta); } }
private void btnSpinner_MouseEnter(object sender, MouseEventArgs e) { if (!isSpinning) { isSpinning = true; // Make a double animation object, and register // with the Completed event. DoubleAnimation dblAnim = new DoubleAnimation(); dblAnim.Completed += (o, s) => { isSpinning = false; }; // Button has 4 seconds to finish the spin! dblAnim.Duration = new Duration(TimeSpan.FromSeconds(4)); // Set the start value and end value. dblAnim.From = 0; dblAnim.To = 360; // Now, create a RotateTransform object, and set // it to the RenderTransform property of our // button RotateTransform rt = new RotateTransform(); btnSpinner.RenderTransform = rt; // Now, animation the RotateTransform object. rt.BeginAnimation(RotateTransform.AngleProperty, dblAnim); } }
public void LoadClick(object sender, EventArgs e) { //MarkAllUiElementsWithTags(); //to delete it later var but = sender as Button; var move = new TranslateTransform(0, 0); var anim = new DoubleAnimation() { Duration = new Duration(TimeSpan.FromSeconds(0.7)), To = but.Margin.Left + Load.Width + 5, AccelerationRatio = 0.5, }; anim.Completed += MoveToLoad; but.RenderTransform = move; move.BeginAnimation(TranslateTransform.XProperty, anim); var moveOther = new TranslateTransform(0, 0); var animOther = new DoubleAnimation() { Duration = new Duration(TimeSpan.FromSeconds(0.5)), To = -Create.Width - 5, AccelerationRatio = 0.5, }; Create.RenderTransform = moveOther; moveOther.BeginAnimation(TranslateTransform.XProperty, animOther); }
public NewsBlock() { InitializeComponent(); if (!System.ComponentModel.DesignerProperties.GetIsInDesignMode(new DependencyObject())) { ProfileManager.ProfileChanged += ReloadNews; LanguageManager.LanguageChanged += OnLanguageChanged; TwitterNewsList.DataContext = TwitterVM; ServerNewsList.DataContext = ServerVM; //Init animations for News DoubleAnimation dShowServerNews = new DoubleAnimation(1, new Duration(TimeSpan.FromMilliseconds(AnimSpeed))); Storyboard.SetTarget(dShowServerNews, ServerNewsList); Storyboard.SetTargetProperty(dShowServerNews, new PropertyPath(OpacityProperty)); DoubleAnimation dShowTwitter = new DoubleAnimation(1, new Duration(TimeSpan.FromMilliseconds(AnimSpeed))); Storyboard.SetTarget(dShowTwitter, TwitterNewsList); Storyboard.SetTargetProperty(dShowTwitter, new PropertyPath(OpacityProperty)); ShowServerNews.Children.Add(dShowServerNews); ShowTwitter.Children.Add(dShowTwitter); bwLoadTwitter.RunWorkerCompleted += (s, e) => { this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(() => { ShowTwitter.Begin(); IsTwitterLoadingAnim(false); })); }; bwLoadTwitter.DoWork += (s1, e1) => { if (!TwitterVM.IsDataLoaded || _jsonUrlLoaded != _jsonUrl) { IsTwitterLoadingAnim(true); this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(() => { TwitterVM.UnLoadData(); })); GetTwitterNewsAPI11(_jsonUrl); this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new DoLoadTwitter((list) => { TwitterVM.LoadData(list); }), TwitterStatuses); _jsonUrlLoaded = _jsonUrl; } }; bwLoadServerNews.RunWorkerCompleted += (s, e) => { this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(() => { ShowServerNews.Begin(); IsServerNewsLoadingAnim(false); })); }; bwLoadServerNews.DoWork += (s1, e1) => { if (!ServerVM.IsDataLoaded) { IsServerNewsLoadingAnim(true); GetServerNews(); this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new DoLoadServerNews((list) => { if (list != null) ServerVM.LoadData(list); }), ServerNews); } }; ReloadNews(this, BaseEventArgs.Empty); } }
public 一个一级部件(bool trurForAdd_falseForAddAndInsert) { //true for added items like 一个一级部件(),一个按钮 //false for inserted items, 两个按钮 InitializeComponent(); 桥梁组成一级部件参数 = new 桥梁组成一级部件(); this.DataContext = 桥梁组成一级部件参数; 二级部件集合ListView.DataContext = this; if (!trurForAdd_falseForAddAndInsert) { AddNewItem.MouseLeftButtonUp += DeleteItem; InsertNewItem.MouseLeftButtonUp += InsertNewItem_MouseLeftButtonUp; InsertNewItem.Visibility = Visibility.Visible; RotateTransform rotateTrans = new RotateTransform(); AddNewItem.RenderTransform = rotateTrans; DoubleAnimation rotateAnim = new DoubleAnimation(45, TimeSpan.FromMilliseconds(300)); rotateTrans.BeginAnimation(RotateTransform.AngleProperty, rotateAnim); } else { AddNewItem.MouseLeftButtonUp += AddNewItem_MouseLeftButtonUp; InsertNewItem.MouseLeftButtonUp += InsertNewItem_MouseLeftButtonUp; } }
public void ForeverBlinkerLoaded(object sender, RoutedEventArgs e) { FrameworkElement fe = sender as FrameworkElement; if (fe != null) { System.Windows.Media.Animation.QuadraticEase QEaseOut = new System.Windows.Media.Animation.QuadraticEase() { EasingMode = System.Windows.Media.Animation.EasingMode.EaseOut }; System.Windows.Media.Animation.Storyboard SB = new System.Windows.Media.Animation.Storyboard(); SB.RepeatBehavior = RepeatBehavior.Forever; SB.Duration = System.TimeSpan.FromMilliseconds(500 * SpeedRatio); System.Windows.Media.Animation.DoubleAnimation fadeout = new System.Windows.Media.Animation.DoubleAnimation(0, System.TimeSpan.FromMilliseconds(100 * SpeedRatio)); fadeout.BeginTime = new System.TimeSpan(0, 0, 0, 0, 0); fadeout.EasingFunction = QEaseOut; System.Windows.Media.Animation.Storyboard.SetTarget(fadeout, fe); System.Windows.Media.Animation.Storyboard.SetTargetProperty(fadeout, new PropertyPath(TextBlock.OpacityProperty)); SB.Children.Add(fadeout); System.Windows.Media.Animation.DoubleAnimation fadein = new System.Windows.Media.Animation.DoubleAnimation(1, System.TimeSpan.FromMilliseconds(100 * SpeedRatio)); fadein.BeginTime = new System.TimeSpan(0, 0, 0, 0, 200); fadein.EasingFunction = QEaseOut; System.Windows.Media.Animation.Storyboard.SetTarget(fadein, fe); System.Windows.Media.Animation.Storyboard.SetTargetProperty(fadein, new PropertyPath(TextBlock.OpacityProperty)); SB.Children.Add(fadein); SB.Begin(); } }
//======================================================================================== // Constructors //======================================================================================== /// <summary> /// This constructor must be called by implementors or the fading functionality /// will not work. /// </summary> public FadingWindow() : base() { this.Opacity = 0.0; // by setting it hidden, this hides the window from the Alt-Tab program switcher this.Visibility = Visibility.Hidden; DoubleAnimation animation = new DoubleAnimation( HiddenOpacity, VisibleOpacity, new Duration(TimeSpan.FromMilliseconds(300))); animation.BeginTime = TimeSpan.FromMilliseconds(100); animation.AutoReverse = false; this.fadeInStoryboard = new Storyboard(); this.fadeInStoryboard.Children.Add(animation); this.fadeInStoryboard.Completed += new EventHandler(ShowCompleted); animation = new DoubleAnimation( VisibleOpacity, HiddenOpacity, new Duration(TimeSpan.FromMilliseconds(500))); animation.BeginTime = TimeSpan.FromMilliseconds(100); animation.AutoReverse = false; this.fadeOutStoryboard = new Storyboard(); this.fadeOutStoryboard.Children.Add(animation); this.fadeOutStoryboard.Completed += new EventHandler(HideCompleted); this.timer = new DispatcherTimer(); this.timer.Tick += new EventHandler(InitiateFadeOut); this.timer.Interval = DefaultFadeOutDelay; }
//得到动画画板 private Storyboard GetStoryboard(double? From1, double To1, double? From2, double To2, double Time1, double Time2) { Storyboard myStoryboard = new Storyboard(); DoubleAnimation myDoubleAnimation = new DoubleAnimation(); if (From1 != null) { myDoubleAnimation.From = From1; } myDoubleAnimation.To = To1; myDoubleAnimation.Duration = new Duration(TimeSpan.FromSeconds(Time1)); myStoryboard.Children.Add(myDoubleAnimation); Storyboard.SetTargetName(myDoubleAnimation, MaskFloor.Name); Storyboard.SetTargetProperty(myDoubleAnimation, new PropertyPath(Rectangle.OpacityProperty)); DoubleAnimation myDoubleAnimation1 = new DoubleAnimation(); if (From2 != null) { myDoubleAnimation1.From = From2; } myDoubleAnimation1.To = To2; myDoubleAnimation1.Duration = new Duration(TimeSpan.FromSeconds(Time2)); myStoryboard.Children.Add(myDoubleAnimation1); Storyboard.SetTargetName(myDoubleAnimation1, InfFloor.Name); Storyboard.SetTargetProperty(myDoubleAnimation1, new PropertyPath(Rectangle.OpacityProperty)); return myStoryboard; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.textBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 2: this.flagImage = ((System.Windows.Controls.Image)(target)); return; case 3: this.da = ((System.Windows.Media.Animation.DoubleAnimation)(target)); #line 18 "..\..\Story.xaml" this.da.Completed += new System.EventHandler(this.DoubleAnimation_Completed); #line default #line hidden return; case 4: this.button = ((System.Windows.Controls.Button)(target)); #line 24 "..\..\Story.xaml" this.button.Click += new System.Windows.RoutedEventHandler(this.button_Click); #line default #line hidden return; } this._contentLoaded = true; }
private void Animation_Completed(object sender, EventArgs e) { switch (navArgs.NavigationMode) { case NavigationMode.New: if (navArgs.Uri == null) NavigationFrame.Navigate(navArgs.Content); else NavigationFrame.Navigate(navArgs.Uri); break; case NavigationMode.Back: NavigationFrame.GoBack(); break; case NavigationMode.Forward: NavigationFrame.GoForward(); break; case NavigationMode.Refresh: NavigationFrame.Refresh(); break; } inNavigation = false; var animation = new DoubleAnimation { From = 0f, To = 1f, Duration = new Duration(TimeSpan.FromMilliseconds(200)) }; NavigationFrame.BeginAnimation(OpacityProperty, animation); }
// When the user left-clicks, use the // SnapshotAndReplace HandoffBehavior when applying the animation. private void border_mouseLeftButtonDown(object sender, MouseButtonEventArgs e) { var clickPoint = Mouse.GetPosition(_containerBorder); // Set the target point so the center of the ellipse // ends up at the clicked point. var targetPoint = new Point { X = clickPoint.X - _interactiveEllipse.Width/2, Y = clickPoint.Y - _interactiveEllipse.Height/2 }; // Animate to the target point. var xAnimation = new DoubleAnimation(targetPoint.X, new Duration(TimeSpan.FromSeconds(4))); _interactiveTranslateTransform.BeginAnimation( TranslateTransform.XProperty, xAnimation, HandoffBehavior.SnapshotAndReplace); var yAnimation = new DoubleAnimation(targetPoint.Y, new Duration(TimeSpan.FromSeconds(4))); _interactiveTranslateTransform.BeginAnimation( TranslateTransform.YProperty, yAnimation, HandoffBehavior.SnapshotAndReplace); // Change the color of the ellipse. _interactiveEllipse.Fill = Brushes.Lime; }
public void ShowHelp(string msg, int maxRepetitions) { if (Enabled == false) return; if (repetitions.ContainsKey(msg)) { --repetitions[msg]; if (repetitions[msg] <= 0) { return; } } else { repetitions.Add(msg, maxRepetitions); } currentMsg = msg; label.Content = "Help: " + msg; label.Foreground = Brushes.Orange; label.Visibility = Visibility.Visible; DoubleAnimation fadein = new DoubleAnimation(0.0, 1.0, new Duration(TimeSpan.FromSeconds(0.5))); //fadein.RepeatBehavior = RepeatBehavior.Forever; label.BeginAnimation(UIElement.OpacityProperty, fadein); }
public static Task SmoothSetAsync(this FrameworkElement @this, DependencyProperty dp, double targetvalue, TimeSpan iDuration, CancellationToken iCancellationToken) { TaskCompletionSource<object> tcs = new TaskCompletionSource<object>(); DoubleAnimation anim = new DoubleAnimation(targetvalue, new Duration(iDuration)); PropertyPath p = new PropertyPath("(0)", dp); Storyboard.SetTargetProperty(anim, p); Storyboard sb = new Storyboard(); sb.Children.Add(anim); EventHandler handler = null; handler = delegate { sb.Completed -= handler; sb.Remove(@this); @this.SetValue(dp, targetvalue); tcs.TrySetResult(null); }; sb.Completed += handler; sb.Begin(@this, true); iCancellationToken.Register(() => { double v = (double)@this.GetValue(dp); sb.Stop(); sb.Remove(@this); @this.SetValue(dp, v); tcs.TrySetCanceled(); }); return tcs.Task; }
public static void Animate(this DependencyObject target, double from, double to, object propertyPath, int duration, int startTime, IEasingFunction easing = null, Action completed = null) { if (easing == null) easing = new SineEase(); var db = new DoubleAnimation(); db.To = to; db.From = from; db.EasingFunction = easing; db.Duration = TimeSpan.FromMilliseconds(duration); Storyboard.SetTarget(db, target); Storyboard.SetTargetProperty(db, new PropertyPath(propertyPath)); var sb = new Storyboard(); sb.BeginTime = TimeSpan.FromMilliseconds(startTime); if (completed != null) { sb.Completed += (s, e) => completed(); } sb.Children.Add(db); sb.Begin(); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.eAdWindow = ((DesktopClient.Menu.MainWindow)(target)); return; case 2: this.FormFade = ((System.Windows.Media.Animation.Storyboard)(target)); return; case 3: this.FormFadeAnimation = ((System.Windows.Media.Animation.DoubleAnimation)(target)); return; case 4: this.FormFadeOut = ((System.Windows.Media.Animation.Storyboard)(target)); #line 26 "..\..\..\..\Menu\MainWindow.xaml" this.FormFadeOut.Completed += new System.EventHandler(this.FormFadeOutCompleted); #line default #line hidden return; case 5: this.FormFadeOutAnimation = ((System.Windows.Media.Animation.DoubleAnimation)(target)); return; case 6: this.MediaGrid = ((System.Windows.Controls.Grid)(target)); return; case 7: this.MediaCanvas = ((System.Windows.Controls.Canvas)(target)); return; case 8: this.clock = ((DesktopClient.Controls.DigitalClockControl)(target)); return; case 9: this.Update_Progress = ((System.Windows.Controls.ProgressBar)(target)); return; case 10: this.StatusBox = ((System.Windows.Controls.TextBox)(target)); #line 48 "..\..\..\..\Menu\MainWindow.xaml" this.StatusBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.StatusBox_TextChanged); #line default #line hidden return; } this._contentLoaded = true; }
//private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) //{ // //var htLocation = Win32.DefWindowProc(hwnd, msg, wParam, lParam).ToInt32(); // switch ((uint)msg) // { // //case Win32.WM_MOUSEACTIVATE: // //case Win32.WM_NCACTIVATE: // case Win32.WM_ACTIVATE: // if (wParam == new IntPtr(Win32.WA_INACTIVE)) // { // handled = true; // activate(); // } // break; // case Win32.WM_KILLFOCUS: // handled = true; // activate(); // break; // } // return IntPtr.Zero; //} //new double Top //{ // get // { // return (double)this.Invoke(() => { return base.Top; }); // } // set // { // base.Top = value; // } //} private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { Closing -= Window_Closing; e.Cancel = true; var a = new System.Windows.Media.Animation.DoubleAnimation(0, (Duration)TimeSpan.FromMilliseconds(300)); a.Completed += (s, _) => this.Close(); this.BeginAnimation(UIElement.OpacityProperty, a); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.windowHelper = ((nsync.HelperWindow)(target)); return; case 2: this.FormFade = ((System.Windows.Media.Animation.Storyboard)(target)); return; case 3: this.FormFadeAnimation = ((System.Windows.Media.Animation.DoubleAnimation)(target)); return; case 4: this.FormFadeOut = ((System.Windows.Media.Animation.Storyboard)(target)); #line 33 "..\..\HelperWindow.xaml" this.FormFadeOut.Completed += new System.EventHandler(this.FormFadeOut_Completed); #line default #line hidden return; case 5: this.FormFadeOutAnimation = ((System.Windows.Media.Animation.DoubleAnimation)(target)); return; case 6: #line 48 "..\..\HelperWindow.xaml" ((System.Windows.Controls.Border)(target)).MouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.windowHelper_MouseRightButtonDown); #line default #line hidden return; case 7: this.ButtonClose = ((System.Windows.Controls.Button)(target)); #line 50 "..\..\HelperWindow.xaml" this.ButtonClose.Click += new System.Windows.RoutedEventHandler(this.ButtonClose_Click); #line default #line hidden return; case 8: this.ContentText = ((System.Windows.Controls.TextBlock)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Alert = ((CloudOps_Assistant.AlertWindow)(target)); #line 14 "..\..\AlertWindow.xaml" this.Alert.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Window_MouseDown); #line default #line hidden #line 17 "..\..\AlertWindow.xaml" this.Alert.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Window_MouseUp); #line default #line hidden #line 17 "..\..\AlertWindow.xaml" this.Alert.Deactivated += new System.EventHandler(this.AlertWindow_Deactivated); #line default #line hidden #line 17 "..\..\AlertWindow.xaml" this.Alert.Activated += new System.EventHandler(this.AlertWindow_Activated); #line default #line hidden return; case 2: this.FormFade = ((System.Windows.Media.Animation.Storyboard)(target)); return; case 3: this.FormFadeAnimation = ((System.Windows.Media.Animation.DoubleAnimation)(target)); return; case 4: this.alertWindow_NotificationText_TextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 5: #line 38 "..\..\AlertWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AlertWindow_Dismiss_Button_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.FormFadeOut = ((System.Windows.Media.Animation.Storyboard)(target)); return; case 2: this.FormFadeOutAnimation = ((System.Windows.Media.Animation.DoubleAnimation)(target)); return; case 3: this.tb_disp = ((System.Windows.Controls.TextBlock)(target)); return; case 4: this.rectOuterr = ((System.Windows.Shapes.Rectangle)(target)); return; case 5: this.rectOuter = ((System.Windows.Shapes.Rectangle)(target)); return; case 6: this.rectInner = ((System.Windows.Shapes.Rectangle)(target)); return; case 7: this.MenuBorder = ((System.Windows.Controls.Border)(target)); return; case 8: this.Menu = ((System.Windows.Controls.MenuItem)(target)); return; case 9: this.OrderMenu = ((System.Windows.Controls.MenuItem)(target)); return; case 10: this.ManMenu = ((System.Windows.Controls.MenuItem)(target)); return; case 11: this.FaderFrame = ((Restaurante_1.Controls.FaderFrame)(target)); return; case 12: this.label1 = ((System.Windows.Controls.Label)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 8 "..\..\frmViewer.xaml" ((Gallery.frmViewer)(target)).Loaded += new System.Windows.RoutedEventHandler(this.WindowLoaded); #line default #line hidden #line 8 "..\..\frmViewer.xaml" ((Gallery.frmViewer)(target)).KeyDown += new System.Windows.Input.KeyEventHandler(this.Window_KeyDown); #line default #line hidden return; case 2: this.ViewedPhotoForSlideShow = ((System.Windows.Controls.Image)(target)); return; case 3: this.buttonNext = ((System.Windows.Controls.Button)(target)); #line 17 "..\..\frmViewer.xaml" this.buttonNext.Click += new System.Windows.RoutedEventHandler(this.Button_Next_Click); #line default #line hidden return; case 4: this.myDoubleAnimationNext = ((System.Windows.Media.Animation.DoubleAnimation)(target)); return; case 5: this.buttonPrevious = ((System.Windows.Controls.Button)(target)); #line 34 "..\..\frmViewer.xaml" this.buttonPrevious.Click += new System.Windows.RoutedEventHandler(this.Button_Prev_Click); #line default #line hidden return; case 6: this.myDoubleAnimationPrev = ((System.Windows.Media.Animation.DoubleAnimation)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 7 "..\..\ElegantMessageBox.xaml" ((Untangled.ElegantMessageBox)(target)).Deactivated += new System.EventHandler(this.Window_Deactivated); #line default #line hidden #line 8 "..\..\ElegantMessageBox.xaml" ((Untangled.ElegantMessageBox)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing); #line default #line hidden return; case 2: this.FormFade = ((System.Windows.Media.Animation.Storyboard)(target)); return; case 3: this.FormFadeAnimation = ((System.Windows.Media.Animation.DoubleAnimation)(target)); return; case 4: this.Wrapper = ((System.Windows.Controls.Border)(target)); #line 23 "..\..\ElegantMessageBox.xaml" this.Wrapper.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Wrapper_MouseDown); #line default #line hidden return; case 5: #line 25 "..\..\ElegantMessageBox.xaml" ((System.Windows.Controls.Grid)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Grid_Loaded); #line default #line hidden return; case 6: this.MessageTxt = ((System.Windows.Controls.TextBlock)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.eADWindow = ((ClientApp.CustomerPage)(target)); return; case 2: this.FormFade = ((System.Windows.Media.Animation.Storyboard)(target)); return; case 3: this.FormFadeAnimation = ((System.Windows.Media.Animation.DoubleAnimation)(target)); return; case 4: this.FormFadeOut = ((System.Windows.Media.Animation.Storyboard)(target)); #line 34 "..\..\..\..\MainUI\CustomerPage.xaml" this.FormFadeOut.Completed += new System.EventHandler(this.FormFadeOut_Completed); #line default #line hidden return; case 5: this.FormFadeOutAnimation = ((System.Windows.Media.Animation.DoubleAnimation)(target)); return; case 6: this.LayoutRoot = ((System.Windows.Controls.Grid)(target)); return; case 7: this.CustomerProfile = ((ClientApp.Widgets.Profile)(target)); return; case 8: this.LocationWidget = ((ClientApp.Widgets.Location)(target)); return; case 9: this.CarInfoWidget = ((ClientApp.Widgets.CarInfo)(target)); return; case 10: this.BatteryInfoWidget = ((ClientApp.Widgets.BatteryInfo)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 8 "..\..\MainWindow.xaml" ((Glavnyi_Monitor.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.Win = ((System.Windows.Controls.Grid)(target)); return; case 3: this.translate = ((System.Windows.Media.TranslateTransform)(target)); return; case 4: this.c1 = ((System.Windows.Media.Animation.DoubleAnimation)(target)); return; case 5: this.f1 = ((System.Windows.Controls.StackPanel)(target)); return; case 6: this.f2 = ((System.Windows.Controls.StackPanel)(target)); return; case 7: this.buttonColor = ((System.Windows.Media.SolidColorBrush)(target)); return; case 8: this.path2 = ((System.Windows.Shapes.Path)(target)); return; case 9: this.path1 = ((System.Windows.Shapes.Path)(target)); return; case 10: this.path = ((System.Windows.Shapes.Path)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.timer = ((System.Windows.Controls.ProgressBar)(target)); return; case 2: this.Animation = ((System.Windows.Media.Animation.DoubleAnimation)(target)); return; } this._contentLoaded = true; }
public static void PersonnelDeploymentMoreSearch(bool Expand, Grid gd) { System.Windows.Media.Animation.DoubleAnimation ta = new System.Windows.Media.Animation.DoubleAnimation(); if (Expand) { ta.To = 264; ta.Duration = (Duration)Application.Current.Resources["SmoothDuration"]; gd.BeginAnimation(Grid.HeightProperty, ta); } else { ta.To = 0; ta.Duration = (Duration)Application.Current.Resources["SmoothDuration"]; gd.BeginAnimation(Grid.HeightProperty, ta); } }
public static void VideoSynopsisMoreSearch(bool Expand, Grid gd, double Old_AdvanceConditon_heigh) { System.Windows.Media.Animation.DoubleAnimation ta = new System.Windows.Media.Animation.DoubleAnimation(); if (Expand) { ta.To = Old_AdvanceConditon_heigh; ta.Duration = (Duration)Application.Current.Resources["SmoothDuration"]; gd.BeginAnimation(Grid.HeightProperty, ta); } else { ta.To = 0; ta.Duration = (Duration)Application.Current.Resources["SmoothDuration"]; gd.BeginAnimation(Grid.HeightProperty, ta); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Control = ((DesktopClient.Menu.RFIDDetected)(target)); return; case 2: this.FormFade = ((System.Windows.Media.Animation.Storyboard)(target)); return; case 3: this.FormFadeAnimation = ((System.Windows.Media.Animation.DoubleAnimation)(target)); return; case 4: this.FormFadeOut = ((System.Windows.Media.Animation.Storyboard)(target)); #line 30 "..\..\..\..\Menu\RFIDDetected.xaml" this.FormFadeOut.Completed += new System.EventHandler(this.FormFadeOut_Completed); #line default #line hidden return; case 5: this.FormFadeOutAnimation = ((System.Windows.Media.Animation.DoubleAnimation)(target)); return; case 6: this.gameplayLayoutRoot = ((System.Windows.Controls.Grid)(target)); return; case 7: #line 43 "..\..\..\..\Menu\RFIDDetected.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.DmouseLeave = ((System.Windows.Media.Animation.DoubleAnimation)(target)); return; case 2: this.DmouseEnter = ((System.Windows.Media.Animation.DoubleAnimation)(target)); return; case 3: this.list_wating = ((System.Windows.Controls.StackPanel)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.LoadedDoubleAnimation = ((System.Windows.Media.Animation.DoubleAnimation)(target)); return; case 2: this.PanelItemBorder = ((System.Windows.Controls.Border)(target)); return; case 3: this.stop1 = ((System.Windows.Media.GradientStop)(target)); return; case 4: this.PanelItemGrid = ((System.Windows.Controls.Grid)(target)); return; case 5: this.PanelItemImage = ((System.Windows.Controls.Image)(target)); return; case 6: this.PanelItemModuleLabel = ((System.Windows.Controls.Label)(target)); return; case 7: this.PanelItemDetails = ((System.Windows.Controls.Label)(target)); return; case 8: this.rectangle1 = ((System.Windows.Controls.Canvas)(target)); #line 49 "..\..\..\..\Internal\CustomControls\StackPanelModuleElement.xaml" this.rectangle1.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.OnDoubleClick); #line default #line hidden return; } this._contentLoaded = true; }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/Run21;component/UserControls/CardControl.xaml", System.UriKind.Relative)); this.MoveRobot = ((System.Windows.Media.Animation.Storyboard)(this.FindName("MoveRobot"))); this.Move = ((System.Windows.Media.Animation.Storyboard)(this.FindName("Move"))); this.xMove = ((System.Windows.Media.Animation.DoubleAnimation)(this.FindName("xMove"))); this.yMove = ((System.Windows.Media.Animation.DoubleAnimation)(this.FindName("yMove"))); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.screens = ((System.Windows.Controls.Canvas)(this.FindName("screens"))); this.front = ((System.Windows.Controls.Grid)(this.FindName("front"))); this.cardContent = ((System.Windows.Controls.ContentPresenter)(this.FindName("cardContent"))); this.back = ((System.Windows.Controls.Grid)(this.FindName("back"))); this.backContent = ((System.Windows.Controls.ContentPresenter)(this.FindName("backContent"))); }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/HFR7;component/ReadTopic.xaml", System.UriKind.Relative)); this.ReadTopicPA = ((Microsoft.Phone.Controls.PhoneApplicationPage)(this.FindName("ReadTopicPA"))); this.quitSB = ((System.Windows.Media.Animation.Storyboard)(this.FindName("quitSB"))); this.enterWB = ((System.Windows.Media.Animation.Storyboard)(this.FindName("enterWB"))); this.opacityWebBrowserDA = ((System.Windows.Media.Animation.DoubleAnimation)(this.FindName("opacityWebBrowserDA"))); this.quitToLeftWB = ((System.Windows.Media.Animation.Storyboard)(this.FindName("quitToLeftWB"))); this.quitToRightWB = ((System.Windows.Media.Animation.Storyboard)(this.FindName("quitToRightWB"))); this.quitLoadingTextBlock = ((System.Windows.Media.Animation.Storyboard)(this.FindName("quitLoadingTextBlock"))); this.enterLoadingTextBlock = ((System.Windows.Media.Animation.Storyboard)(this.FindName("enterLoadingTextBlock"))); this.quitSearch = ((System.Windows.Media.Animation.Storyboard)(this.FindName("quitSearch"))); this.enterSearch = ((System.Windows.Media.Animation.Storyboard)(this.FindName("enterSearch"))); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.TopicPanel = ((System.Windows.Controls.Grid)(this.FindName("TopicPanel"))); this.readTopicWebBrowser = ((Microsoft.Phone.Controls.WebBrowser)(this.FindName("readTopicWebBrowser"))); this.loadingCanvas = ((System.Windows.Controls.Canvas)(this.FindName("loadingCanvas"))); this.loadingStackPanel = ((System.Windows.Controls.StackPanel)(this.FindName("loadingStackPanel"))); this.topicNameTextBlock = ((System.Windows.Controls.TextBlock)(this.FindName("topicNameTextBlock"))); this.pagesTextBlock = ((System.Windows.Controls.TextBlock)(this.FindName("pagesTextBlock"))); this.searchCanvas = ((System.Windows.Controls.Canvas)(this.FindName("searchCanvas"))); this.searchStackPanel = ((System.Windows.Controls.StackPanel)(this.FindName("searchStackPanel"))); this.searchPseudoTextBox = ((System.Windows.Controls.TextBox)(this.FindName("searchPseudoTextBox"))); this.searchWordTextBox = ((System.Windows.Controls.TextBox)(this.FindName("searchWordTextBox"))); this.searchStartButton = ((System.Windows.Controls.Button)(this.FindName("searchStartButton"))); this.choosePageCanvas = ((System.Windows.Controls.Canvas)(this.FindName("choosePageCanvas"))); this.pageNumberChooseTextBox = ((System.Windows.Controls.TextBox)(this.FindName("pageNumberChooseTextBox"))); this.pageNumberChooseButton = ((System.Windows.Controls.Button)(this.FindName("pageNumberChooseButton"))); this.internWebBrowserCanvas = ((System.Windows.Controls.Canvas)(this.FindName("internWebBrowserCanvas"))); this.internWebBrowser = ((Microsoft.Phone.Controls.WebBrowser)(this.FindName("internWebBrowser"))); this.refreshButton = ((Microsoft.Phone.Shell.ApplicationBarIconButton)(this.FindName("refreshButton"))); this.answerButton = ((Microsoft.Phone.Shell.ApplicationBarIconButton)(this.FindName("answerButton"))); this.previousPageAppbarButton = ((Microsoft.Phone.Shell.ApplicationBarIconButton)(this.FindName("previousPageAppbarButton"))); this.nextPageAppbarButton = ((Microsoft.Phone.Shell.ApplicationBarIconButton)(this.FindName("nextPageAppbarButton"))); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.gun = ((System.Windows.Controls.Canvas)(target)); return; case 2: this.content1 = ((System.Windows.Controls.StackPanel)(target)); return; case 3: this.t1 = ((System.Windows.Controls.TextBlock)(target)); return; case 4: this.info = ((System.Windows.Media.Animation.DoubleAnimation)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this._bd = ((System.Windows.Controls.Border)(target)); return; case 2: this._brushTransform = ((System.Windows.Media.TranslateTransform)(target)); return; case 3: this._storyboard = ((System.Windows.Media.Animation.Storyboard)(target)); return; case 4: this._scrollAnimation = ((System.Windows.Media.Animation.DoubleAnimation)(target)); return; } this._contentLoaded = true; }
public static void CarSearchPanelAnimation(ToggleButton btnExpand, Grid SecondPanel, Grid rootPanel) { System.Windows.Media.Animation.DoubleAnimation ta = new System.Windows.Media.Animation.DoubleAnimation(); ta.EasingFunction = new BackEase() { EasingMode = EasingMode.EaseInOut }; if (btnExpand.IsChecked == true) { ta.To = rootPanel.ActualWidth - (11); ta.Duration = (Duration)Application.Current.Resources["TInOutDuration"]; SecondPanel.BeginAnimation(Grid.WidthProperty, ta); //if (SearchResultPanel.Children.Count == 1) //{ // SearchResultPanel.Children.Remove(SearchResult); // SearchResultPanel_Expand.Children.Add(SearchResult); // ReturnSearechPanelBtn.Visibility = Visibility.Collapsed; // SearchResultPanel_Expand.Visibility = Visibility.Visible; //} } else { ta.Completed += (a, b) => { }; ta.To = 360; ta.Duration = (Duration)Application.Current.Resources["TInOutDuration"]; SecondPanel.BeginAnimation(Grid.WidthProperty, ta); //if (SearchResultPanel_Expand.Children.Count == 2) //{ // SearchResultPanel_Expand.Children.Remove(SearchResult); // SearchResultPanel.Children.Add(SearchResult); // SearchResultPanel_Expand.Visibility = Visibility.Collapsed; // ReturnSearechPanelBtn.Visibility = Visibility.Visible; //} } }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/NewTask;component/MainPage.xaml", System.UriKind.Relative)); this.textscrolling = ((System.Windows.Media.Animation.Storyboard)(this.FindName("textscrolling"))); this.ScrollStoryboard = ((System.Windows.Media.Animation.Storyboard)(this.FindName("ScrollStoryboard"))); this.AnimationH = ((System.Windows.Media.Animation.DoubleAnimation)(this.FindName("AnimationH"))); this.AnimationV = ((System.Windows.Media.Animation.DoubleAnimation)(this.FindName("AnimationV"))); this.LayoutRoot = ((System.Windows.Controls.StackPanel)(this.FindName("LayoutRoot"))); this.newTaskForm = ((System.Windows.Controls.Grid)(this.FindName("newTaskForm"))); this.taskBox = ((System.Windows.Controls.TextBox)(this.FindName("taskBox"))); this.makeTaskToggle = ((System.Windows.Controls.Primitives.ToggleButton)(this.FindName("makeTaskToggle"))); this.MainLongListSelector = ((Microsoft.Phone.Controls.LongListSelector)(this.FindName("MainLongListSelector"))); this.menuPanel = ((System.Windows.Controls.StackPanel)(this.FindName("menuPanel"))); this.TitleBlock = ((System.Windows.Controls.TextBlock)(this.FindName("TitleBlock"))); this.TitleBlockRectangle = ((System.Windows.Shapes.Rectangle)(this.FindName("TitleBlockRectangle"))); this.menuOptions = ((System.Windows.Controls.Grid)(this.FindName("menuOptions"))); this.upArrowLeft = ((System.Windows.Controls.Image)(this.FindName("upArrowLeft"))); this.upArrowRight = ((System.Windows.Controls.Image)(this.FindName("upArrowRight"))); this.downArrowLeft = ((System.Windows.Controls.Image)(this.FindName("downArrowLeft"))); this.downArrowRight = ((System.Windows.Controls.Image)(this.FindName("downArrowRight"))); this.upArrowLeftlight = ((System.Windows.Controls.Image)(this.FindName("upArrowLeftlight"))); this.upArrowRightlight = ((System.Windows.Controls.Image)(this.FindName("upArrowRightlight"))); this.downArrowLeftlight = ((System.Windows.Controls.Image)(this.FindName("downArrowLeftlight"))); this.downArrowRightlight = ((System.Windows.Controls.Image)(this.FindName("downArrowRightlight"))); this.PurchaseIconLight = ((System.Windows.Controls.Image)(this.FindName("PurchaseIconLight"))); this.PurchaseIconDark = ((System.Windows.Controls.Image)(this.FindName("PurchaseIconDark"))); this.reviewLight = ((System.Windows.Controls.Image)(this.FindName("reviewLight"))); this.reviewDark = ((System.Windows.Controls.Image)(this.FindName("reviewDark"))); this.shareLight = ((System.Windows.Controls.Image)(this.FindName("shareLight"))); this.shareDark = ((System.Windows.Controls.Image)(this.FindName("shareDark"))); this.iTchyBanditBlock = ((System.Windows.Controls.TextBlock)(this.FindName("iTchyBanditBlock"))); this.pinTileButton = ((System.Windows.Controls.Button)(this.FindName("pinTileButton"))); }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/HFR7;component/SearchTopic.xaml", System.UriKind.Relative)); this.SearchTopicPA = ((Microsoft.Phone.Controls.PhoneApplicationPage)(this.FindName("SearchTopicPA"))); this.quitSB = ((System.Windows.Media.Animation.Storyboard)(this.FindName("quitSB"))); this.enterSB = ((System.Windows.Media.Animation.Storyboard)(this.FindName("enterSB"))); this.opacityWebBrowserDA = ((System.Windows.Media.Animation.DoubleAnimation)(this.FindName("opacityWebBrowserDA"))); this.quitLoadingTextBlock = ((System.Windows.Media.Animation.Storyboard)(this.FindName("quitLoadingTextBlock"))); this.enterLoadingTextBlock = ((System.Windows.Media.Animation.Storyboard)(this.FindName("enterLoadingTextBlock"))); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.TopicPanel = ((System.Windows.Controls.Grid)(this.FindName("TopicPanel"))); this.readTopicWebBrowser = ((Microsoft.Phone.Controls.WebBrowser)(this.FindName("readTopicWebBrowser"))); this.loadingCanvas = ((System.Windows.Controls.Canvas)(this.FindName("loadingCanvas"))); this.loadingStackPanel = ((System.Windows.Controls.StackPanel)(this.FindName("loadingStackPanel"))); this.topicNameTextBlock = ((System.Windows.Controls.TextBlock)(this.FindName("topicNameTextBlock"))); this.pagesTextBlock = ((System.Windows.Controls.TextBlock)(this.FindName("pagesTextBlock"))); this.internWebBrowserCanvas = ((System.Windows.Controls.Canvas)(this.FindName("internWebBrowserCanvas"))); this.internWebBrowser = ((Microsoft.Phone.Controls.WebBrowser)(this.FindName("internWebBrowser"))); }
public static void BigDataSearchPanelAnimation(ToggleButton btnExpand, Grid GridSearch, Border SearchPanel) { System.Windows.Media.Animation.DoubleAnimation ta = new System.Windows.Media.Animation.DoubleAnimation(); ta.EasingFunction = new BackEase() { EasingMode = EasingMode.EaseInOut }; if (btnExpand.IsChecked == true) { GridSearch.Visibility = Visibility.Hidden; // ta.Completed += (a, b) => { }; ta.To = 37; ta.Duration = (Duration)Application.Current.Resources["TInOutDuration"]; SearchPanel.BeginAnimation(Border.WidthProperty, ta); } else { ta.Completed += (a, b) => { GridSearch.Visibility = Visibility.Visible; }; ta.To = 315; ta.Duration = (Duration)Application.Current.Resources["TInOutDuration"]; SearchPanel.BeginAnimation(Border.WidthProperty, ta); } }
public static void FaceSearchPanelAnimation(ToggleButton btnExpand, Grid SecondPanel, Grid rootPanel, double width) { System.Windows.Media.Animation.DoubleAnimation ta = new System.Windows.Media.Animation.DoubleAnimation(); ta.EasingFunction = new BackEase() { EasingMode = EasingMode.EaseInOut }; if (btnExpand.IsChecked == true) { ta.To = rootPanel.ActualWidth - (11 + width); ta.Duration = (Duration)Application.Current.Resources["TInOutDuration"]; SecondPanel.BeginAnimation(Grid.WidthProperty, ta); } else { ta.Completed += (a, b) => { }; ta.To = 360; ta.Duration = (Duration)Application.Current.Resources["TInOutDuration"]; SecondPanel.BeginAnimation(Grid.WidthProperty, ta); } }
private void frm_nav_Navigated(object sender, NavigationEventArgs e) { double translateTo = 0.0, translateFrom = 0.0; var currentStep = (int)App.Current.Properties[Constants.ApplicationProperties.CurrentStep]; var nextStep = (int)App.Current.Properties[Constants.ApplicationProperties.NextStep]; //switch (currentStep) //{ // case Constants.ApplicationProperties.Steps.step1: // translateTo = txb_pg1.Margin.Top - rectangle1.Margin.Top; // break; // case Constants.ApplicationProperties.Steps.step2: // translateTo = txb_pg2.Margin.Top - rectangle1.Margin.Top; // translateFrom = txb_pg1.Margin.Top; // break; // case Constants.ApplicationProperties.Steps.step3: // translateTo = txb_pg2.Margin.Top - rectangle1.Margin.Top; // translateFrom = txb_pg1.Margin.Top; // break; // default: // break; //} translateTo = nextStep; translateFrom = currentStep; App.Current.Properties["stepSlider"] = translateTo; var transform = new TranslateTransform(); Duration duration = new Duration(new TimeSpan(0, 0, 0, 2, 0)); DoubleAnimation anim = new DoubleAnimation(translateFrom, translateTo, duration); transform.BeginAnimation(TranslateTransform.YProperty, anim); rectangle1.RenderTransform = transform; }