using Microsoft.Graphics.Canvas; using Microsoft.Graphics.Canvas.UI.Xaml; private void canvas_Draw(CanvasControl sender, CanvasDrawEventArgs args) { args.DrawingSession.DrawRectangle(10, 10, 100, 50, Colors.Black, 2); }
using Microsoft.Graphics.Canvas; using Microsoft.Graphics.Canvas.UI.Xaml; private void canvas_Draw(CanvasControl sender, CanvasDrawEventArgs args) { args.DrawingSession.FillRectangle(50, 50, 200, 100, Colors.Red); }Both examples are using the Microsoft.Graphics.Canvas package library.