Isolinetext label

Apr 19, 2010 at 9:36 AM

I want to do something similar i.e how labels are recreated and drawn "OnRender" method when fast-isolines are rendered, basically i don't want to show the legends and want to display labels right on the lines curves. The OnRender method in isolines example uses annotater and isolines text labels which are specific to isolines, how can i achieve the same with linegraphs? I don't want you to write the code (thought glad if you can write it) but any hints would be great assistance.

I know one way to achieve this would be by attaching text label with the viewport2d, but then the labels would be attached to X and Y value and needs to be re-rendered and reposition again when the user zoom in/out.

Thanks.

Editor
Apr 19, 2010 at 11:02 PM

Hi!

If you do not need to update the number of labels being drawed while zoom, then ViewportHostPanel can be a good solution for you. It can host any UIElement, and by using its attached poperties like X, Y, ViewportWidth and ViewportHeight (or maybe ViewportBounds) you can archive behaviour of textlabels similar to isolines. 

If you need to change your labels while zooming, than I'm sorry and you'll have to do this part manually.

Best regards,

Mikhail.