1

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?

Androme
  • 2,399
  • 4
  • 43
  • 82
  • Is this XAML? In that case you can do this just by defining a style on Separator element. – Nikhil Vartak Jan 15 '16 at 07:43
  • 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 Jan 15 '16 at 08:48

1 Answers1

2

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

Rene Schulte
  • 2,962
  • 1
  • 19
  • 26