1
votes

Are there a way when using writeablebitmap with writeablebitmapEx to draw a dashed line? Without having to manually calculate the dashes and create multiple lines to create the dashing effect?

1
Is this XAML? In that case you can do this just by defining a style on Separator element. - Nikhil Vartak
Short answer: No. There is no explicit support for dashed and/or dotted lines in WriteableBitmapEx. I have not tried it myself, but you might be able to experiment with DrawLinePenned, where you can provide an arbitrary WriteableBitmap object as your pen component. - Anders Gustafsson

1 Answers

2
votes

Yes, use DrawLinePenned with a BitmapContext pen. You can use another image as pen or just create it on the fly.