Hi,
Is it possible to retrieve the position of the mouse on the ruler? I would like to display it in decimal in my control.
Best Regards,
Michael
Hi,
I"m working with RadDiagram where I added several RadDiagramContainerShape and RadDiagramShape. The main container is a RadDiagramContainerShape and it is positioned at (0, 0) according to the RadDiagram.
When I click on the top left corner of the main container, at the red dot in the attached image, the button click is (41,39). Then I use PointToClient to get the position in the RadDiagram and I have (35, -40), knowing that it is supposed to be around (0, 0). Then to make sure of this I calculated the PointToScreen using the main container location which is (0, 0). The result was (6, 79), but it is supposed to be around the button click (41,39).
In addition, when I drag and drop shapes to my main container it never goes to the cursor position because all what is mentioned above is not accurate.
Is this normal, and what can I do to fix this?
Thanks in advance for your help!
Hi,
Is it possible to create Fishbone (cause effect) diagram with telerik diagram control?
Like the image attached.
Best
Delio Tomaz
I want to give the user the option to use Gliding connectors, i have enabled them by giving my shapes the property
<Setter Property="UseGlidingConnector" Value="{Binding GlidingEnabled , Mode=TwoWay}"/>
and then letting the user change the GlidingEnabled value from the UI, and that works fine.
But then as soon as one shape is moved the connector is reset (note that i am also using the classic connector style (Bottom,Top,Left,Right,Auto) by default. Maybe there is a conflict? Also im using the AStarRouter for routing the connections)
Is there something i can do to lock the gliding connector position when it is created ? Or is that against its logic?
Public Overrides Sub OnNavigatedTo(url As String, parameters As Dictionary(Of String, String))
Dim node1 As New Node With {.Name = "MAGTF", .Visibility = Visibility.Visible}
Me.RootNode = node1
Dim node2 As New Node With {.Name = "CE", .Rank = Rank.BrigadierGeneral, .AdvocateCode = AdvocateCode.CE}
Dim node3 As New Node With {.Name = "GGE", .Rank = Rank.BrigadierGeneral, .AdvocateCode = AdvocateCode.GCE}
Dim node4 As New Node With {.Name = "ACE", .Rank = Rank.BrigadierGeneral, .AdvocateCode = AdvocateCode.ACE}
Dim node5 As New Node With {.Name = "LCE", .Rank = Rank.BrigadierGeneral, .AdvocateCode = AdvocateCode.LCE}
node1.Children.Add(node2)
node1.Children.Add(node3)
node1.Children.Add(node4)
node1.Children.Add(node5)
Me.GraphSource.PopulateGraphSource(node1)
End Sub
Private Sub RefillNodes(nodes As IEnumerable(Of Unit))
Me.GraphSource.Clear()
Me.RootNode.Children.Clear()
Me.GraphSource.AddNode(RootNode)
For Each Node As Unit In nodes
'Either this
Me.RootNode.Children.Add(New Node With {.Name = Node.Name, .Rank = Rank.Captain})
'Or this
'Me.GraphSource.AddNode(New Node With {.Name = Node.Name, .Rank = Rank.Captain})
'Me.GraphSource.AddLink(New Link(RootNode, New Node With {.Name = Node.Name, .Rank = Rank.Captain}))
Next
Me.GraphSource.PopulateGraphSource(RootNode)
End Sub
<
telerik:RadDiagram
Grid.Column
=
"1"
x:Name
=
"diagram"
Zoom
=
"1"
IsBackgroundSurfaceVisible
=
"True"
IsManipulationAdornerVisible
=
"True"
SnapValue
=
"5"
ActiveTool
=
"PanTool"
>
<
telerik:RadDiagram.Background
>
<
ImageBrush
ImageSource
=
"/SilverlightApplication90;component/floorplan.png"
/>
</
telerik:RadDiagram.Background
>
</
telerik:RadDiagram
>
this.graphSource = new GraphSource();
ObservableCollection<
Node
> hierarchicalDataSource;
PopulateGraphSource();