How to add text to path?
- by Pritorian
Hi all. Te question is how to add text to path element. For example, I have path:
Path firstPath = new Path();
firstPath.Stroke = Brushes.Black;
firstPath.StrokeThickness = 1;
myCanvas.Children.Add(firstPath);
LineGeometry firstLine = new LineGeometry();
firstPath.Data = firstLine;
And somewhere I define line's Start and End point's. The path is binded to controls (for example - two ellipses) and when I drag one of them, the line is dynamically resized and moved to be pinned to both objects.
And now I wand to add some text, that would fit to this line and follow it. Any recommendations how to do this?