Telerik Forums
UI for Silverlight Forum
2 answers
153 views

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

Loic
Top achievements
Rank 1
 answered on 01 Mar 2021
2 answers
85 views

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!

Hocine
Top achievements
Rank 1
 answered on 26 Jun 2020
5 answers
300 views

Hi,

Is it possible to create Fishbone (cause effect) diagram with telerik diagram control?

Like the image attached.

 

Best

 

Delio Tomaz

Dinko | Tech Support Engineer
Telerik team
 answered on 16 Jun 2020
7 answers
114 views
Hello,

I Required to make the RadDiagramToolBox ItemArea on Vertical so that only one shape can display in one row next shape will be display in second line and so on.

Please find the attached screen shot how it look likes

ToolboxOrignal.Png is the Actually functionaliyt
ToolBoxItemsAreaVertial.png  is what we want to achieve.

Please let me know if you required more information.

Thanks,
Hiren
Marco
Top achievements
Rank 1
 answered on 12 Nov 2019
3 answers
84 views

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?

Vladimir Stoyanov
Telerik team
 answered on 06 Aug 2019
4 answers
199 views
Hi

I'm using RadDiagram (Telerik 2012 Q2), I want to detect my selected shape in a rad diagram. There is an event named ShapeClicked in RadDiagram object, but its sender parameter is a raddiagram (I think it should be a rad shape, i.e. the shape which has been clicked), how can I get the clicked/selected shape? Also shape object has a mouseleftbutton down event which can help me do my work, but it seems that this event is raised only for the first shape object created on the diagram

I've inserted a rad color picker in my project that is used to set/change rad diagram shape colors (it works fine) but I want to enable color detection of my SELECTED shape, so that when user selects a shape, the color picker gets its color, what should I do? I'm dynamically adding shapes to my diagram (diagram.items.add)

thanks
Petar Mladenov
Telerik team
 answered on 12 Jun 2019
6 answers
119 views
Do you have any examples of loading nodes on demand with the Diagram OrgChart example?  What I would like to do is only show the first level on initial load of the XML data source and be able to expand nodes to show their children.  Thanks.
Konstantin
Top achievements
Rank 1
 answered on 19 Dec 2018
17 answers
318 views
I have a diagram that I would like to update based on what the user clicks. Basically I want an organizational chart with two levels... the root level and its children. When a user clicks on a child of the root level then the child become the root and any children that it may have will appear below it.

When the user comes to the page I build the first two levels statically and the diagram loads and looks just fine:

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

But then when they click on a child node I load the new information from the database and it looks all messed up:

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

I can either use PopulateGraphSource or add the nodes and links in the loop, either way it turns out the same.

What am I doing wrong? I add the nodes and the links and then I call Layout - just like I do statically, but the links aren't connected to the nodes and the nodes are laid out all funky.

Attached is an example of the before and after I click on a child node.
Martin Ivanov
Telerik team
 answered on 09 Jun 2017
7 answers
252 views

Hi

I am trying to use the Diagram module to allow users to zoom in on an area based on a background image.

<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>


Can you explain how it is possible to allow the background image to be dynamic so that when the user 'zooms' in, the background image also becomes relative to the zoom.  For example in a floor plan, zooming into a 'room'.

In the above code, the background image remains static.  What I would like is that the background image is also part of the zoom, so when the user zooms towards an 'area' the background image is also zoomed.

Thanks in advance

Mark.
Martin Ivanov
Telerik team
 answered on 25 Apr 2017
2 answers
77 views
Hello,

I am facing an issue where my graph is tree layout and looks fine initially. However, if I choose to change GraphSource upon user input/ clicks using PopulateGraphSource like in the OrgChart example, I get all the nodes stacked on top of each other with no links and all in corner.

I tried resetting graphSource by creating a new one  
this.graphSource = new GraphSource();

I also tried to use the Clear method for GraphSource. Neither did solve the problem, I keep having the same issue.

I am using
ObservableCollection<Node> hierarchicalDataSource;
to fill up my GraphSource object.

All I do is create a new one and then call
PopulateGraphSource();
method.


Martin Ivanov
Telerik team
 answered on 16 Mar 2017
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?