Why I load diagram the whole picture zoom in first the zoom out?

2 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    26 posts
    Member since:
    Jan 2016

    Posted 29 Jul Link to this post

    hello,when I load diagram use code like this:

                        StreamReader streamReader = new StreamReader(diagramXmlFile);
                        string data = streamReader.ReadToEnd();

                        RadDocumentPane diagramPane = new RadDocumentPane();
                        DataTemplate doctabTemplate = (DataTemplate)CRWindow.TryFindResource("doctab");
                        StackPanel docTab = (StackPanel)doctabTemplate.LoadContent();
                       diagramPane.Header = docTab;
                       UserControl diagramUserControl = new UserControl(diagram, true);
                       diagramPane.Content = diagramUserControl;

    And I add diagramPane to RadDocking-DocumentHost-RadSplitContainer-RadPaneGroup, but when I run the program and open this pane, I find that the diagram is zoom in first, and then zoom out to fit the window,why?   Hope to answer, Thanks !

  2. Peshito
    Peshito avatar
    493 posts

    Posted 02 Aug Link to this post


    I tried to reproduce this unexpected behavior using the information provided but to no avail. There is not enough info about the diagram's properties set. Attached is the sample project I worked on. Please feel free to make any changes to it and send it back to us so we can reproduce the issue locally. You could also provide a sample runnable project of your own. As this is a forum thread you will need to use a third party web site for files sharing.

    Something you could try is to set the diagram's AutoLayout  property to True.

    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. DevCraft R3 2016 release webinar banner
Back to Top