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

IConnection visibility doesn't automatically update

3 Answers 80 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Matthias
Top achievements
Rank 1
Matthias asked on 20 May 2017, 04:16 PM

I have a MVVM RadDiagram setup that binds data via SerializableGraphSourceBase<T, U>. In that setup:

  • When I change the Visibility property of any node object directly in RadDiagram.Items, the corresponding wrapper IShape object in RadDiagram.Shapes also updates its Visibility property. The node is visible/hidden/collapsed in on the graph's canvas.
  • When I change the Visibility property of any edge object in RadDiagram.Items, the corresponding IConnection wrapper in RadDiagram.Connections does not update its visibility property. The connection is always drawn on the canvas.

What to do?

Erando
Top achievements
Rank 1
commented on 13 Apr 2022, 07:35 AM

I had the same problem, where I couldn't change a RadDiagramConnection's visibility neither with Style triggers nor with Binding (only through directly setting their visibility). I fixed it by turning off the DiagramSurface.IsVirtualizing property.

3 Answers, 1 is accepted

Sort by
0
Matthias
Top achievements
Rank 1
answered on 21 May 2017, 04:56 PM
I worked around this by manually iteration over RadDiagram.Connections and setting those IConnections to the correct Visibility property. But this strikes me as something that should be unnecessary.
0
Matthias
Top achievements
Rank 1
answered on 22 May 2017, 11:00 PM
I fixed this more elegantly by establish a 2-way databinding between my edge object and the IConnection's Visibility property.
0
Accepted
Dinko | Tech Support Engineer
Telerik team
answered on 24 May 2017, 01:47 PM
Hi Matthias,

We are happy to hear that you managed to found a solution for your case. If you have any other questions you can open a new ticket thread with your question. This way we can more easily answer your questions and track communication.

Regards,
Dinko
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
Diagram
Asked by
Matthias
Top achievements
Rank 1
Answers by
Matthias
Top achievements
Rank 1
Dinko | Tech Support Engineer
Telerik team
Share this question
or