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

TransformToAncestor from RadDiagram bad value

1 Answer 65 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Valentin
Top achievements
Rank 1
Iron
Iron
Valentin asked on 02 Feb 2018, 02:03 PM

Hello Telerik,

 

I'm using a RadDiagram containing shapes. These shapes has TextBlock to display some text.

I search to get the position of a TextBlock inside this RadDiagram.

 

I did it (tb is a TextBlock and Me.MirBuilderDiagram is a RadDiagram) :

tb.TransformToAncestor(Me.MirBuilderDiagram).Transform(New Point(0, 0))

 

The problem is that values are false : the top-left corner of the RadDiagram is set to 20;20, and for a TextBock next to this corner, I get the wrong value. I tried to get the position with the parent of the RadDiagram (a Grid), but I have the same result.

 

I attached 2 screenshots with :

- raddiagram : showing you the visual RadDiagram

- debug : showing you the debug with an attached watcher.

 

How I can get the good values ?

Thank you.

 

1 Answer, 1 is accepted

Sort by
0
Valentin
Top achievements
Rank 1
Iron
Iron
answered on 05 Feb 2018, 07:49 AM
The problem is due to a custom operation, you can delete this post, sorry.
Tags
Diagram
Asked by
Valentin
Top achievements
Rank 1
Iron
Iron
Answers by
Valentin
Top achievements
Rank 1
Iron
Iron
Share this question
or