コード例 #1
0
 /// <summary>
 /// Draws the specified rectangle.
 /// </summary>
 public void Draw(DualViewsDrawingModel.Shapes.Rectangle rectangle)
 {
     Windows.UI.Xaml.Shapes.Rectangle drawingPageCanvasRectangle = new Windows.UI.Xaml.Shapes.Rectangle();
     drawingPageCanvasRectangle.Width  = rectangle.Width;
     drawingPageCanvasRectangle.Height = rectangle.Height;
     drawingPageCanvasRectangle.Stroke = new SolidColorBrush(Colors.Black);
     _canvas.Children.Add(drawingPageCanvasRectangle);
     Canvas.SetLeft(drawingPageCanvasRectangle, rectangle.X);
     Canvas.SetTop(drawingPageCanvasRectangle, rectangle.Y);
 }
 /// <summary>
 /// Draws the specified rectangle.
 /// </summary>
 public void Draw(DualViewsDrawingModel.Shapes.Rectangle rectangle)
 {
     _graphics.DrawRectangle(Pens.Black, ( float )rectangle.X, ( float )rectangle.Y, ( float )rectangle.Width, ( float )rectangle.Height);
 }
 /// <summary>
 /// Draws the selection border.
 /// </summary>
 public void DrawSelectionBorder(DualViewsDrawingModel.Shapes.Rectangle rectangle)
 {
     _graphics.DrawRectangle(GetSelectionBorderDashPen(), ( float )rectangle.X, ( float )rectangle.Y, ( float )rectangle.Width, ( float )rectangle.Height);
 }