This is a migrated thread and some comments may be shown as answers.

Custom drawing 'on top of' shapes / the diagram control?

1 Answer 143 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Douwe
Top achievements
Rank 1
Douwe asked on 20 Oct 2015, 07:10 AM

Hello,

Currently I am looking into using the Telerik Diagram library for a new application. Users have to be able to load a background image and then draw (and modify) areas of interest on top of this map (using the standard shapes). On top of that a the 'track / path' of a person has to be drawn / plotted (see the attached image). This drawing / plotting has to be 'live / animated' (e.g. the position of the person changes and this has to be visualized in real-time). Do you have any hints / tips on how to achieve this? What I would like is to have some kind of drawing canvas which has the same size as the 'background image shape' but anything drawn here should be displayed 'over' the other placed shapes. This canvas should also respond to zooming in/out of the diagram.

Kind regards,

Douwe

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 22 Oct 2015, 08:41 AM
Hi Douwe,

I will try to split your requirement into two sub features and elaborate more on them.

First, you can draw shapes on top of all other shapes with Diagram Drawing tools. To manually position shapes on top of other shapes you can set their ZIndex property. When you draw a shape , its Geometry property contains the drawn geometry path. Also, the Zoom and Pan operations will scale / move the shapes out of the box and you won't need to use separate canvas with lots of synchronizing code between the diagram and the Canvas.

Second, the animating of shape (path) moving along other shape (path) is a general well known problem in WPF and some approach can be used from forums / blog posts / codeplex.

http://stackoverflow.com/questions/12337852/moving-shape-along-path 

We hope this helps.

Regards,
Petar Mladenov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Diagram
Asked by
Douwe
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or