Example #1
0
        public void Render(IPreview frameEditor, Rect rect)
        {
            if (_line == null)
            {
                _line = new Rectangle();
                frameEditor.Canva.Children.Add(_line);
                _line.StrokeThickness     = 1;
                _line.SnapsToDevicePixels = true;
                _line.SetValue(RenderOptions.EdgeModeProperty, EdgeMode.Aliased);
            }

            _line.Fill   = BufferedBrushes.GetBrush(SelectionOverlay);
            _line.Height = (int)rect.Height;
            _line.Width  = (int)rect.Width;

            _line.Margin = new Thickness((int)rect.X, (int)rect.Y, 0, 0);
            _line.Stroke = BufferedBrushes.GetBrush(SelectionBorder);
        }
Example #2
0
 private Brush _getBorderBackgroundBrush()
 {
     return(BufferedBrushes.GetBrush(SelectionOverlayBrush));
 }
Example #3
0
 private Brush _getBorderBrush()
 {
     return(BufferedBrushes.GetBrush(SelectionBorderBrush));
 }
Example #4
0
 private Brush _getColor()
 {
     return(BufferedBrushes.GetBrush(_orientation == Orientation.Horizontal ? GridLineHorizontalBrush : GridLineVerticalBrush));
 }