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

The diagram pane display is slow,how to make it fast?

2 Answers 71 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 27 May 2017, 07:42 AM

Hi, like the OpenDiagramdemo.zip, i have a diagram, when startup, it add 500 shapes to this diagram. Then i click the "click me" in the left treeview to open a radpane, and the radpane show the diagram. The problem is that it takes too much time to opening the radpane. When opened, i move the view area in the thumbnail, its response is slow too. How to make fast?

Hope answers, thanks!

OpenDiagramdemo.zip download url:  http://www.filefactory.com/file/5cu3dseh6x8h/OpenDiagramdemo.zip

2 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 30 May 2017, 07:43 AM
Hi Jonathan,

Thumbnail is performing refresh for every shape. That is why we want to suggest RadDiagramNavigationPane. It wraps Thumbnail and can be collapsed until the diagram loads:

public RadDiagramNavigationPane diagramThumbnail = null;
 
     public MyDiagramUserControl(RadDiagram diagram, bool needsThumnail)
     {
         InitializeComponent();
         this.diagram = diagram;
         if (!this.diagramHostPanel.Children.Contains(diagram))
             this.diagramHostPanel.Children.Add(diagram);
         if (needsThumnail)
         {
             diagramThumbnail = new RadDiagramNavigationPane() { Diagram = diagram };
             diagramThumbnail.VerticalAlignment = VerticalAlignment.Bottom;
             diagramThumbnail.HorizontalAlignment = HorizontalAlignment.Left;           
             diagramThumbnail.IsExpanded =false;
             this.diagramHostPanel.Children.Add(diagramThumbnail);
             diagram.Loaded += (s, e) =>
             {
                 diagramThumbnail.IsExpanded = true;
                 diagramThumbnail.RefreshThumbnail();
             };
         }
     }


Regards,
Petar Mladenov
Progress Telerik
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.
0
Jonathan
Top achievements
Rank 1
answered on 31 May 2017, 03:12 AM
Thank you, Peter. It's OK!
Tags
Diagram
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Jonathan
Top achievements
Rank 1
Share this question
or