protected void SetupRevealExpandAnimation(AnimatedPropertySetting animation) { switch (this.ExpandDirection) { case RadDirection.Left: animation.StartValue = (object)new Rectangle(new Point(this.ownerControl.Size.Width - this.HeaderElement.Size.Width - (this.LayoutElement.Margin.Right + this.LayoutElement.Margin.Left), this.LayoutElement.Location.Y), new Size(0, this.LayoutElement.Size.Height)); animation.EndValue = (object)new Rectangle(new Point(this.LayoutElement.BoundingRectangle.X, this.LayoutElement.BoundingRectangle.Y), this.LayoutElement.Size); break; case RadDirection.Right: animation.StartValue = (object)new Rectangle(this.LayoutElement.BoundingRectangle.Location, new Size(0, this.LayoutElement.Size.Height)); animation.EndValue = (object)new Rectangle(this.LayoutElement.BoundingRectangle.Location, this.LayoutElement.Size); break; case RadDirection.Up: animation.StartValue = (object)new Rectangle(new Point(this.LayoutElement.Location.X, this.ownerControl.Size.Height - this.HeaderElement.Size.Height - (this.LayoutElement.Margin.Top + this.LayoutElement.Margin.Bottom)), new Size(this.LayoutElement.Size.Width, 0)); animation.EndValue = (object)new Rectangle(new Point(this.LayoutElement.Margin.Left - this.LayoutElement.Margin.Right, this.Size.Height - this.LayoutElement.Size.Height - this.HeaderElement.Size.Height - this.LayoutElement.Margin.Bottom), this.LayoutElement.Size); break; case RadDirection.Down: animation.StartValue = (object)new Rectangle(this.LayoutElement.BoundingRectangle.Location, new Size(this.LayoutElement.Size.Width, 0)); animation.EndValue = (object)new Rectangle(this.LayoutElement.BoundingRectangle.Location, this.LayoutElement.Size); break; } }
private void ShowCore() { hideMenus = false; this.animationFinished = false; RadMessageFilter.Instance.AddListener(this); RadModalFilter.Instance.MenuHierarchyClosing += new EventHandler(Instance_MenuHierarchyClosing); SizeF originalScaleTransform = this.element.ScaleTransform; AnimatedPropertySetting animatedExpand = new AnimatedPropertySetting( RadElement.ScaleTransformProperty, originalScaleTransform, zoomFactor, animationFrames, animationInterval); animatedExpand.ApplyValue(this.element); animatedExpand.AnimationFinished += delegate { animationFinished = true; this.element.ShouldHandleMouseInput = this.elementHandleMouseInput; this.element.IsMouseOver = true; this.ApplyElementShape(); }; }
public virtual void Collapse() { if (this.IsCollapsed) { return; } CancelEventArgs e = new CancelEventArgs(); this.OnCollapsing(e); if (e.Cancel) { return; } this.IsCollapsed = true; foreach (LightVisualElement lightVisualElement in (IEnumerable <RadPageViewItem>) this.Items) { lightVisualElement.DrawText = false; } NavigationViewDisplayModes effectiveDisplayMode = this.GetEffectiveDisplayMode((float)this.Size.Width); if (effectiveDisplayMode == NavigationViewDisplayModes.Expanded) { if (this.AllowAnimation) { Size size1 = new Size(TelerikDpiHelper.ScaleInt(this.ExpandedPaneWidth, new SizeF(1f / this.DpiScaleFactor.Width, 0.0f)), 0); Size size2 = new Size(TelerikDpiHelper.ScaleInt(this.CollapsedPaneWidth, new SizeF(1f / this.DpiScaleFactor.Width, 0.0f)), 0); AnimatedPropertySetting animatedPropertySetting = new AnimatedPropertySetting(RadElement.MinSizeProperty, (object)size1, (object)size2, this.AnimationFrames, this.AnimationInterval); animatedPropertySetting.AnimationFinished += (AnimationFinishedEventHandler)((param0, param1) => this.OnCollapsed(EventArgs.Empty)); animatedPropertySetting.ApplyValue((RadObject)this.ItemContainer); } else { this.ItemContainer.MinSize = new Size(TelerikDpiHelper.ScaleInt(this.CollapsedPaneWidth, new SizeF(1f / this.DpiScaleFactor.Width, 0.0f)), 0); this.OnCollapsed(EventArgs.Empty); } } else { this.programmaticallyClosingPopup = true; this.Popup.ClosePopup(RadPopupCloseReason.Mouse); this.HamburgerButton.StretchHorizontally = false; this.programmaticallyClosingPopup = false; if (effectiveDisplayMode == NavigationViewDisplayModes.Compact) { this.ItemContainer.MinSize = new Size(TelerikDpiHelper.ScaleInt(this.CollapsedPaneWidth, new SizeF(1f / this.DpiScaleFactor.Width, 0.0f)), 0); this.ItemContainer.MaxSize = new Size(TelerikDpiHelper.ScaleInt(this.CollapsedPaneWidth, new SizeF(1f / this.DpiScaleFactor.Width, 0.0f)), 0); if (!this.Children.Contains((RadElement)this.ItemContainer)) { int num = (int)this.Popup.RootElement.ResetValue(VisualElement.BackColorProperty, ValueResetFlags.Local); this.Children.Insert(0, (RadElement)this.ItemContainer); } } if (!this.Children.Contains((RadElement)this.HamburgerButton)) { int num = (int)this.HamburgerButton.ResetValue(RadElement.AlignmentProperty, ValueResetFlags.Local); this.Children.Add((RadElement)this.HamburgerButton); } this.OnCollapsed(EventArgs.Empty); } }
public override void Collapse(GridViewRowInfo rowInfo, float maxOffset, int rowIndex) { this.IsAnimating = true; this.OnUpdateViewNeeded(EventArgs.Empty); IList <GridRowElement> visualRows = this.TableElement.VisualRows; for (int index = rowIndex; index < visualRows.Count; ++index) { GridRowElement gridRowElement = visualRows[index]; if (gridRowElement.Visibility != ElementVisibility.Hidden) { new AnimatedPropertySetting(VisualElement.OpacityProperty, (object)0.0, (object)1.0, 9, 30) { ApplyEasingType = RadEasingType.OutQuint, RemoveAfterApply = true, ApplyDelay = ((index - rowIndex) * 25) }.ApplyValue((RadObject)gridRowElement); AnimatedPropertySetting animatedPropertySetting = new AnimatedPropertySetting(RadElement.PositionOffsetProperty, (object)new SizeF(0.0f, maxOffset), (object)new SizeF(0.0f, 0.0f), 9, 30); animatedPropertySetting.ApplyEasingType = RadEasingType.OutQuad; animatedPropertySetting.RemoveAfterApply = true; animatedPropertySetting.ApplyDelay = (index - rowIndex) * 25; animatedPropertySetting.ApplyValue((RadObject)gridRowElement); if (index == visualRows.Count - 1) { animatedPropertySetting.AnimationFinished += new AnimationFinishedEventHandler(this.CollapseSetting_AnimationFinished); } } } }
/// <summary> /// Overidden in order to start a fade-in animation that shows the panel that /// holds the demo. Before the animation is started, all child controls in the panel /// are hidden. /// </summary> /// <param name="e"></param> protected override void OnLoad(EventArgs e) { base.OnLoad(e); bool enableFadeAnimation = this.IsFadeAnimationEnabled(); if (!enableFadeAnimation) { return; } foreach (Control currentControl in this.radPanelDemoHolder.Controls) { RadControl radControl = currentControl as RadControl; if (radControl != null) { radControl.Visible = false; } } fadeAnimation = new AnimatedPropertySetting( RadItem.OpacityProperty, 25, 10, (object)0.01); fadeAnimation.AnimationFinished += new AnimationFinishedEventHandler(loadAnimation_AnimationFinished); fadeAnimation.StartValue = 0.0; fadeAnimation.EndValue = 1.0; fadeAnimation.ApplyValue(this.radPanelDemoHolder.PanelElement); }
protected void SetupRevealCollapseAnimation(AnimatedPropertySetting animation) { switch (this.ExpandDirection) { case RadDirection.Left: animation.StartValue = (object)new Rectangle(this.ownerControl.ControlsContainer.Location, this.ownerControl.ControlsContainer.Size); animation.EndValue = (object)new Rectangle(new Point(this.ownerControl.ControlsContainer.Location.X + this.ownerControl.ControlsContainer.Size.Width, 0), new Size(0, this.ownerControl.ControlsContainer.Size.Height)); break; case RadDirection.Right: animation.StartValue = (object)new Rectangle(this.ownerControl.ControlsContainer.Location, this.ownerControl.ControlsContainer.Size); animation.EndValue = (object)new Rectangle(new Point(this.ownerControl.ControlsContainer.Location.X, 0), new Size(0, this.ownerControl.ControlsContainer.Size.Height)); break; case RadDirection.Up: animation.StartValue = (object)new Rectangle(this.ownerControl.ControlsContainer.Location, this.ownerControl.ControlsContainer.Size); animation.EndValue = (object)new Rectangle(new Point(0, this.ownerControl.ControlsContainer.Location.Y + this.ownerControl.ControlsContainer.Size.Height), new Size(this.ownerControl.ControlsContainer.Size.Width, 0)); break; case RadDirection.Down: animation.StartValue = (object)new Rectangle(this.ownerControl.ControlsContainer.Location, this.ownerControl.ControlsContainer.Size); animation.EndValue = (object)new Rectangle(this.ownerControl.ControlsContainer.Location, new Size(this.ownerControl.ControlsContainer.Size.Width, 0)); break; } }
private void InitializeForwardAnimationSetting() { SizeF cellSize = this.proposedBounds.Size; cellSize.Width *= this.ZoomFactor; cellSize.Height *= this.ZoomFactor; int xOffset = (int)(cellSize.Width - proposedBounds.Width); int yOffset = (int)(cellSize.Height - proposedBounds.Height); int x = -xOffset; //(int)(proposedBounds.X - xOffset); int y = -yOffset; //(int)(proposedBounds.Y - yOffset); int width = (int)(cellSize.Width + xOffset); int height = (int)(cellSize.Height + yOffset); this.forwardsAnimate = new AnimatedPropertySetting(RadElement.BoundsProperty, new Rectangle(0, 0, proposedBounds.Width, proposedBounds.Height) , new Rectangle( x, y, width, height), 8, 20); this.forwardsFontAnimate = new AnimatedPropertySetting(VisualElement.FontProperty, this.oldFont, new Font(this.Font.FontFamily, this.oldFont.Size * 1.5f * this.ZoomFactor), 8, 20); this.forwardsFontAnimate.RemoveAfterApply = true; }
private void InitializeBackwardAnimationSetting() { SizeF cellSize = this.proposedBounds.Size; cellSize.Width *= this.ZoomFactor; cellSize.Height *= this.ZoomFactor; int xOffset = (int)(cellSize.Width - proposedBounds.Width); int yOffset = (int)(cellSize.Height - proposedBounds.Height); int x = -xOffset; //(int)(proposedBounds.X - xOffset); int y = -yOffset; //(int)(proposedBounds.Y - yOffset); int width = (int)(cellSize.Width + xOffset); int height = (int)(cellSize.Height + yOffset); this.backwardsAnimate = new AnimatedPropertySetting(RadElement.BoundsProperty, new Rectangle( x, y, width, height), proposedBounds, 10, 20); this.backwardsAnimate.AnimationFinished += new AnimationFinishedEventHandler(OnAnimationFinished); this.backwardsFontAnimate = new AnimatedPropertySetting(VisualElement.FontProperty, this.oldFont, new Font(this.Font.FontFamily, this.oldFont.Size), 8, 20); }
private void ApplyValueToGauge(float value) { AnimatedPropertySetting setting = new AnimatedPropertySetting(RadRadialGaugeElement.ValueProperty, value, _timerIsIncrement ? value + 10 : value - 10, 15, 30); setting.ApplyEasingType = RadEasingType.InOutBounce; setting.ApplyValue(radRadialGauge1.GaugeElement); Application.DoEvents(); }
private void AddScaleAnimation( RadItem item, List <AnimatedPropertySetting> animations, bool show) { SizeF sizeF1; SizeF sizeF2; if (show) { item.Visibility = ElementVisibility.Hidden; sizeF1 = this.scaleAnimation; sizeF2 = RadRotatorItem.fullScale; } else { item.Visibility = ElementVisibility.Visible; sizeF1 = RadRotatorItem.fullScale; sizeF2 = this.scaleAnimation; } AnimatedPropertySetting animation = new AnimatedPropertySetting(RadElement.ScaleTransformProperty, (object)sizeF1, (object)sizeF2, this.animationFrames, 40); animation.ApplyEasingType = RadEasingType.InOutQuad; if (show) { animation.AnimationStarted += (AnimationStartedEventHandler)((param0, param1) => item.Visibility = ElementVisibility.Visible); animation.AnimationFinished += (AnimationFinishedEventHandler)((param0, param1) => { animations.Remove(animation); --this.animationsRunning; if (this.animationsRunning != 0) { return; } this.OnEndRotate((object)this, EventArgs.Empty); }); } else { animation.AnimationFinished += (AnimationFinishedEventHandler)((param0, param1) => { animations.Remove(animation); if (animations.Count == 0) { item.Visibility = ElementVisibility.Hidden; } --this.animationsRunning; if (this.animationsRunning != 0) { return; } this.OnEndRotate((object)this, EventArgs.Empty); }); } animations.Add(animation); }
public virtual void Collapse(bool ignoreIsExpanded, bool stopAnimations) { this.ownerControl.LoadElementTree(); bool isExpanded = ignoreIsExpanded || this.IsExpanded; if (this.IsAnimating || !isExpanded || (this.ElementTree.RootElement.ElementState != ElementState.Loaded || this.preventExpandCollapse) || !this.OnCollapsing()) { return; } this.ExecuteCollapsePreparations(); bool previousIsAnimatingValue = false; if (stopAnimations) { previousIsAnimatingValue = this.EnableAnimation; this.EnableAnimation = false; } AnimatedPropertySetting animation = this.CreateAnimation(isExpanded); AnimationFinishedEventHandler animationFinishedHandler = (AnimationFinishedEventHandler)null; animationFinishedHandler = (AnimationFinishedEventHandler)((param0, param1) => { this.preventExpandCollapse = true; animation.AnimationFinished -= animationFinishedHandler; this.IsExpanded = false; if (stopAnimations) { this.EnableAnimation = previousIsAnimatingValue; } this.preventExpandCollapse = false; this.ExecuteCollapseFinalizations(); int num = (int)this.SetAnimatedObjectValue(animation.Property, animation.EndValue); this.OnCollapsed(); }); animation.AnimationFinished += animationFinishedHandler; RadObject objectToBeAnimated = this.GetObjectToBeAnimated(); if (this.EnableAnimation) { animation.ApplyValue(objectToBeAnimated); } else { bool animationsEnabled = AnimatedPropertySetting.AnimationsEnabled; AnimatedPropertySetting.AnimationsEnabled = false; animation.NumFrames = 1; animation.Interval = 1; animation.ApplyValue(objectToBeAnimated); AnimatedPropertySetting.AnimationsEnabled = animationsEnabled; } if (!this.ElementTree.RootElement.EnableElementShadow) { return; } this.ownerControl.RootElement.PaintControlShadow(); }
private void AddLocationAnimation( RadItem item, List <AnimatedPropertySetting> animations, bool show) { Rectangle rectangle1; Rectangle rectangle2; if (show) { item.Visibility = ElementVisibility.Hidden; rectangle1 = new Rectangle((int)((double)item.Bounds.Width * (double)this.locationAnimation.Width), (int)((double)item.Bounds.Height * (double)this.locationAnimation.Height), item.Bounds.Width, item.Bounds.Height); rectangle2 = new Rectangle(0, 0, item.Bounds.Width, item.Bounds.Height); } else { item.Visibility = ElementVisibility.Visible; rectangle1 = item.Bounds; rectangle2 = new Rectangle(-(int)((double)this.Bounds.Width * (double)this.locationAnimation.Width), -(int)((double)this.Bounds.Height * (double)this.locationAnimation.Height), item.Bounds.Width, item.Bounds.Height); } AnimatedPropertySetting animation = new AnimatedPropertySetting(RadElement.BoundsProperty, (object)rectangle1, (object)rectangle2, this.animationFrames, 40); animation.ApplyEasingType = RadEasingType.InOutQuad; if (show) { animation.AnimationStarted += (AnimationStartedEventHandler)((param0, param1) => item.Visibility = ElementVisibility.Visible); animation.AnimationFinished += (AnimationFinishedEventHandler)((param0, param1) => { animations.Remove(animation); --this.animationsRunning; if (this.animationsRunning != 0) { return; } this.OnEndRotate((object)this, EventArgs.Empty); }); } else { animation.AnimationFinished += (AnimationFinishedEventHandler)((param0, param1) => { animations.Remove(animation); if (animations.Count == 0) { item.Visibility = ElementVisibility.Hidden; } --this.animationsRunning; if (this.animationsRunning != 0) { return; } this.OnEndRotate((object)this, EventArgs.Empty); }); } animations.Add(animation); }
protected override void InitializeFields() { base.InitializeFields(); this.enableScrolling = true; this.scrollAnimation = new AnimatedPropertySetting(); this.scrollAnimation.NumFrames = 5; this.scrollAnimation.ApplyEasingType = RadEasingType.InOutQuad; this.scrollAnimation.Property = ScrollOffsetProperty; }
private void zoomInOffset_AnimationFinished(object sender, AnimationStatusEventArgs e) { this.ContinueAnimatedTiles(); AnimatedPropertySetting animatedPropertySetting = sender as AnimatedPropertySetting; if (animatedPropertySetting == null) { return; } this.ScrollView((int)((SizeF)animatedPropertySetting.EndValue).Width); }
private void ApplyValueToGauge(RadRadialGauge radRadialGauge, ref float step) { var setting = new AnimatedPropertySetting( RadRadialGaugeElement.ValueProperty, radRadialGauge.Value, radRadialGauge.Value + step, 12, 10) { ApplyEasingType = RadEasingType.OutCubic }; setting.ApplyValue(radRadialGauge.GaugeElement); }
private void AddOpacityAnimation(RadItem item, List <AnimatedPropertySetting> animations, bool show) { item.Visibility = show ? ElementVisibility.Hidden : ElementVisibility.Visible; double to = show ? 1d : 0d; double from = 1d - to; AnimatedPropertySetting animation = new AnimatedPropertySetting( VisualElement.OpacityProperty, from, to, animationFrames, 40); animation.ApplyEasingType = RadEasingType.InOutQuad; if (show) { animation.AnimationStarted += delegate { item.Visibility = ElementVisibility.Visible; }; animation.AnimationFinished += delegate { animations.Remove(animation); animationsRunning--; if (animationsRunning == 0) { OnEndRotate(this, EventArgs.Empty); } }; } else { animation.AnimationFinished += delegate { animations.Remove(animation); if (animations.Count == 0) { item.Visibility = ElementVisibility.Hidden; } animationsRunning--; if (animationsRunning == 0) { OnEndRotate(this, EventArgs.Empty); } }; } animations.Add(animation); }
protected override void InitializeFields() { base.InitializeFields(); this.enableScrolling = true; this.scrollAnimation = new AnimatedPropertySetting(); this.scrollAnimation.RemoveAfterApply = true; this.scrollAnimation.NumFrames = 5; this.scrollAnimation.ApplyEasingType = RadEasingType.InOutQuad; this.scrollAnimation.Property = StripViewItemLayout.ScrollOffsetProperty; int num; this.scrollAnimation.AnimationFinished += (AnimationFinishedEventHandler)((param0, param1) => num = (int)this.SetValue(StripViewItemLayout.ScrollOffsetProperty, this.scrollAnimation.EndValue)); }
protected AnimatedPropertySetting CreateCollapseAnimation() { AnimatedPropertySetting animation = new AnimatedPropertySetting(); if (this.AnimationType == CollapsiblePanelAnimationType.Reveal) { this.SetupRevealCollapseAnimation(animation); } else if (this.AnimationType == CollapsiblePanelAnimationType.Slide) { this.SetupSlideCollapseAnimation(animation); } return(animation); }
private void ZoomOutTiles() { AnimatedPropertySetting animatedPropertySetting1 = new AnimatedPropertySetting(GridLayout.CellPaddingProperty, (object)new Padding(5), (object)new Padding(10), 3, 25); foreach (RadTileElement tile in this.GetTiles()) { AnimatedPropertySetting animatedPropertySetting2 = new AnimatedPropertySetting(RadElement.ScaleTransformProperty, (object)new SizeF(1f, 1f), (object)new SizeF((float)(1.0 - 10.0 / (double)tile.Size.Width), (float)(1.0 - 10.0 / (double)tile.Size.Height)), 3, 25); if (tile != this.Context) { animatedPropertySetting2.ApplyValue((RadObject)tile); animatedPropertySetting1.ApplyValue((RadObject)tile); } } this.zoomedOutTiles = true; }
private void Reset() { var setting = new AnimatedPropertySetting( RadRadialGaugeElement.ValueProperty, radRadialGauge1.Value, 0f, 2, 10) { ApplyEasingType = RadEasingType.OutBounce }; setting.ApplyValue(radRadialGauge1.GaugeElement); lblFilesLength.Text = ""; lblDuration.Text = ""; }
protected override void InitializeFields() { base.InitializeFields(); this.Value = true; this.ThumbTickness = 20; this.SwitchElasticity = 0.5; this.AnimationInterval = 10; this.AllowAnimation = true; this.AnimationFrames = 20; this.IsAnimating = false; this.readOnly = false; this.ToggleStateMode = ToggleStateMode.ClickAndDrag; this.currentAnimation = new AnimatedPropertySetting(); this.currentAnimation.AnimationStarted += new AnimationStartedEventHandler(this.Animation_AnimationStarted); this.currentAnimation.AnimationFinished += new AnimationFinishedEventHandler(this.Animation_AnimationFinished); }
public override void OnPropertyChange(RadElement element, RadPropertyChangedEventArgs e) { bool flag = (bool)e.NewValue; if (flag) { element.ResetValue(RadElement.ScaleTransformProperty); AnimatedPropertySetting animatedPropertySetting = new AnimatedPropertySetting(RadElement.ScaleTransformProperty, new SizeF(0.65f, 0.65f), new SizeF(1f, 1f), 5, 30); animatedPropertySetting.ApplyValue(element); } else { AnimatedPropertySetting animatedPropertySetting2 = new AnimatedPropertySetting(RadElement.ScaleTransformProperty, new SizeF(0.65f, 0.65f), 5, 30); animatedPropertySetting2.ApplyValue(element); } }
protected virtual void ProcessSlideAnimation() { if (this.oldItem != null && !this.oldItem.IsDisposed) { this.currentOutAnimation = new AnimatedPropertySetting(RadElement.PositionOffsetProperty, (object)SizeF.Empty, (object)this.GetSlideOutOffset(), this.AnimationFrames, this.AnimationInterval); this.currentOutAnimation.RemoveAfterApply = true; this.currentOutAnimation.AnimationFinished += new AnimationFinishedEventHandler(this.outAnimation_AnimationFinished); this.currentOutAnimation.ApplyValue((RadObject)this.oldItem); } if (this.currentItem == null || this.currentItem.IsDisposed) { return; } this.currentInAnimation = new AnimatedPropertySetting(RadElement.PositionOffsetProperty, (object)this.GetSlideInOffset(), (object)SizeF.Empty, this.AnimationFrames, this.AnimationInterval); this.currentInAnimation.RemoveAfterApply = true; this.currentInAnimation.ApplyValue((RadObject)this.currentItem); }
protected virtual void ProcessFadeAnimation() { if (this.oldItem != null && !this.oldItem.IsDisposed) { this.currentOutAnimation = new AnimatedPropertySetting(VisualElement.OpacityProperty, (object)1.0, (object)0.0, this.AnimationFrames, this.AnimationInterval); this.currentOutAnimation.RemoveAfterApply = true; this.currentOutAnimation.ApplyValue((RadObject)this.oldItem); this.currentOutAnimation.AnimationFinished += new AnimationFinishedEventHandler(this.outAnimation_AnimationFinished); } if (this.currentItem == null || this.currentItem.IsDisposed) { return; } this.currentInAnimation = new AnimatedPropertySetting(VisualElement.OpacityProperty, (object)0.0, (object)1.0, this.AnimationFrames, this.AnimationInterval); this.currentInAnimation.RemoveAfterApply = true; this.currentInAnimation.ApplyValue((RadObject)this.currentItem); }
private void InitializeBackwardAnimationSetting() { SizeF size = (SizeF)this.proposedBounds.Size; size.Width *= this.ZoomFactor; size.Height *= this.ZoomFactor; int num1 = (int)((double)size.Width - (double)this.proposedBounds.Width); int num2 = (int)((double)size.Height - (double)this.proposedBounds.Height); int x = -num1; int y = -num2; int width = (int)((double)size.Width + (double)num1); int height = (int)((double)size.Height + (double)num2); this.backwardsAnimate = new AnimatedPropertySetting(RadElement.BoundsProperty, (object)new Rectangle(x, y, width, height), (object)this.proposedBounds, 10, 20); this.backwardsAnimate.AnimationFinished += new AnimationFinishedEventHandler(this.OnAnimationFinished); this.backwardsFontAnimate = new AnimatedPropertySetting(VisualElement.FontProperty, (object)this.oldFont, (object)new Font(this.Font.FontFamily, this.oldFont.Size), 8, 20); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); ((CartesianArea)this.radChartView1.View.Area).ShowGrid = true; this.radDropDownList1.DataSource = chartTypes; this.radDropDownList2.DataSource = lineCombineModes; int i = 1; foreach (DataPointElement dpe in this.radChartView1.Series[0].Children) { dpe.IsVisible = false; AnimatedPropertySetting setting = new AnimatedPropertySetting(); setting.StartValue = false; setting.EndValue = true; setting.Property = UIChartElement.IsVisibleProperty; setting.ApplyDelay = 40 + 40 * i; setting.NumFrames = 2; setting.ApplyValue(dpe); i++; } i = 1; foreach (DataPointElement dpe in this.radChartView1.Series[1].Children) { dpe.IsVisible = false; AnimatedPropertySetting setting = new AnimatedPropertySetting(); setting.StartValue = false; setting.EndValue = true; setting.Property = UIChartElement.IsVisibleProperty; setting.ApplyDelay = 60 + 60 * i; setting.NumFrames = 2; setting.ApplyValue(dpe); i++; } CartesianArea area = this.radChartView1.GetArea <CartesianArea>(); area.ShowGrid = true; CartesianGrid grid = area.GetGrid <CartesianGrid>(); grid.DrawHorizontalStripes = true; grid.DrawVerticalStripes = true; }
private void InitializeForwardAnimationSetting() { SizeF size = (SizeF)this.proposedBounds.Size; size.Width *= this.ZoomFactor; size.Height *= this.ZoomFactor; int num1 = (int)((double)size.Width - (double)this.proposedBounds.Width); int num2 = (int)((double)size.Height - (double)this.proposedBounds.Height); int x = -num1; int y = -num2; int width = (int)((double)size.Width + (double)num1); int height = (int)((double)size.Height + (double)num2); this.forwardsAnimate = new AnimatedPropertySetting(RadElement.BoundsProperty, (object)new Rectangle(0, 0, this.proposedBounds.Width, this.proposedBounds.Height), (object)new Rectangle(x, y, width, height), 8, 20); this.forwardsAnimate.RemoveAfterApply = true; this.forwardsFontAnimate = new AnimatedPropertySetting(VisualElement.FontProperty, (object)this.oldFont, (object)new Font(this.Font.FontFamily, this.oldFont.Size * 1.5f * this.ZoomFactor), 8, 20); this.forwardsFontAnimate.RemoveAfterApply = true; }
private void radCarousel1_SelectedIndexChanged(object sender, System.EventArgs e) { RadItem item = (this.radCarouselAlbums.SelectedItem as RadItem); if (item != null && item.Tag != null) { this.selectedItemText.Text = (string)EvaluatePropertyValue(item.Tag, "AlbumName"); AnimatedPropertySetting setting = new AnimatedPropertySetting( VisualElement.ForeColorProperty, Color.Transparent, Color.WhiteSmoke, 10, 40); setting.ApplyValue(selectedItemText); } }
private void radButtonMore_Click(object sender, EventArgs e) { radButtonMore.Visible = false; radPanelMore.Height = 1; radPanelMore.Visible = true; AnimatedPropertySetting setting = new AnimatedPropertySetting(); setting.Property = RadElement.BoundsProperty; setting.StartValue = new Rectangle(radPanelMore.Location.X, radPanelMore.Location.Y + 79, radPanelMore.Width, 1); setting.EndValue = new Rectangle(radPanelMore.Location.X, radPanelMore.Location.Y, radPanelMore.Width, radPanelMore.Height); setting.Interval = 30; setting.NumFrames = 10; setting.ApplyValue(radPanelMore.RootElement); //this.ShowAlertBox("Manager Features", "Please becareful with these powerful features!"); }
private void ShowCore() { this.hideMenus = false; this.animationFinished = false; RadMessageFilter.Instance.AddListener((IMessageListener)this); RadModalFilter.Instance.MenuHierarchyClosing += new EventHandler(this.Instance_MenuHierarchyClosing); SizeF scaleTransform = this.element.ScaleTransform; AnimatedPropertySetting animatedPropertySetting = new AnimatedPropertySetting(RadElement.ScaleTransformProperty, (object)scaleTransform, (object)this.zoomFactor, this.animationFrames, this.animationInterval); animatedPropertySetting.ApplyValue((RadObject)this.element); animatedPropertySetting.AnimationFinished += (AnimationFinishedEventHandler)((param0, param1) => { this.animationFinished = true; this.element.ShouldHandleMouseInput = this.elementHandleMouseInput; this.element.IsMouseOver = true; this.ApplyElementShape(); }); }
private void LoadExample(string exampleName) { if (currentExample != string.Empty) { return; } this.currentExample = exampleName; this.headerLabel.Text = this.currentExample; this.backButton.Visibility = ElementVisibility.Visible; this.examplePage.PositionOffset = new SizeF(-this.radPanorama1.Width, 0); examplePage.Visibility = ElementVisibility.Visible; AnimatedPropertySetting setting = new AnimatedPropertySetting(RadElement.PositionOffsetProperty, new SizeF(-this.radPanorama1.Width, 0), SizeF.Empty, (int)(10d * 800d / this.Width), 10); setting.AnimationFinished += new AnimationFinishedEventHandler(OnExampleOpened); setting.ApplyValue(this.examplePage); }
private void UnloadExample() { this.Controls.Remove(this.GetCurrentExampleControl()); this.backButton.Visibility = ElementVisibility.Hidden; this.headerLabel.Text = ConfigurationSettings.AppSettings["ApplicationLabel"].ToString(); this.examplePage.PositionOffset = new SizeF(-this.radPanorama1.Width, 0); examplePage.Visibility = ElementVisibility.Visible; AnimatedPropertySetting setting = new AnimatedPropertySetting(RadElement.PositionOffsetProperty, SizeF.Empty, new SizeF(-this.radPanorama1.Width, 0), (int)(10d * 1000d / this.Width), 10); setting.AnimationFinished += new AnimationFinishedEventHandler(OnExampleClosed); setting.ApplyValue(this.examplePage); }