How do you draw a dashed line on a Canvas in .NET MAUI?

Platform: .NET MAUI| Category: General

The following example shows how to draw a dashed line:
C#

canvas.StrokeColor = Colors.Red;
canvas.StrokeSize = 4;
canvas.StrokeDashPattern = new float[] { 2, 2 };
canvas.DrawLine(10, 10, 90, 100);

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.