private void BringIntoView(RadDiagramItem shape) { // Bring shape to view. // We cannot use the default BringIntoView() becuase the shape is only partially obscured // If shape is within viewport, do nothing. if (shape.Bounds.IsInBounds(this.Diagram.Viewport)) { return; } var offset = this.Diagram.Viewport.GetOffset(shape.Bounds, 20); // Extension OffsetRect is part of Telerik.Windows.Diagrams.Core this.Diagram.BringIntoView(this.Diagram.Viewport.OffsetRect(offset.X, offset.Y)); var animation = new DoubleAnimation { AutoReverse = true, Duration = TimeSpan.FromMilliseconds(300), From = 1, To = 0.3, RepeatBehavior = new RepeatBehavior(3) }; shape.BeginAnimation(OpacityProperty, animation); }
public EditorInfo(RadFixedPage page, IPosition position, RadDiagramItem element, Rect bounds, Brush stroke, double angle) { this.Page = page; this.Position = position; this.Background = element.Background; this.StrokeThickness = element.StrokeThickness; this.StrokeDashArray = element.StrokeDashArray; this.Opacity = element.Opacity; this.Stroke = stroke; this.Bounds = bounds; this.Angle = angle; }