CanvasDrawingSession session = CanvasControl.CreateDrawingSession(); session.DrawEllipse(new Vector2(100, 100), 50, 35, Windows.UI.Colors.Green);
CanvasDrawingSession session = Canvas.CreateDrawingSession(); CanvasStrokeStyle stroke = new CanvasStrokeStyle(); stroke.DashStyle = CanvasDashStyle.Dot; stroke.DashOffset = 3; session.DrawEllipse(new Vector2(35, 35), 30, 25, Windows.UI.Colors.Navy, 5, stroke);In this example, we create a new drawing session for a canvas and customize the stroke style using the CanvasStrokeStyle to create a dotted stroke. We then draw an ellipse using the DrawEllipse method with the specified parameters, including the stroke thickness and customized stroke style. The CanvasDrawingSession.DrawEllipse method belongs to the Microsoft.Graphics.Canvas namespace, which is included in the Microsoft.Graphics.Canvas NuGet package library.