Save Layout with Controls??

2 posts, 0 answers
  1. ITA
    ITA avatar
    383 posts
    Member since:
    Aug 2009

    Posted 06 Feb 2013 Link to this post


    i add a RadPane dynamically by clicking a button.
    RadPane radPane = new RadPane() { Content = new Controls.LayoutData() };
    RadPaneGroup radPaneGroup = new RadPaneGroup();
    RadSplitContainer radSplitContainer = new RadSplitContainer() { InitialPosition = DockState.FloatingDockable };

    As you can see the Content of the RadPane ist a Usercontrol called "Controls.LayoutData". In this Control i can choose a Report,
    which is shown in the Control.

    But how do i save this layout?

    This way just save the Layout with empty RadPanes:
          MemoryStream stream = new MemoryStream();
          stream.Seek(0, SeekOrigin.Begin);
          StreamReader reader = new StreamReader(stream);
          string xml_s = reader.ReadToEnd();
          string path_s = Klassen.helper.WPFAnwendung_Path() + "/Layout/laoyut.xml";
          using (StreamWriter Mywriter = new StreamWriter(@path_s))

    how do I save the contents of the newly created/all RadPanes????

    Thanks a lot
    Best Regards
  2. Boyan
    Boyan avatar
    758 posts

    Posted 11 Feb 2013 Link to this post

    Hello Rene,

    You should set the SerializationTag to the added elements in order to save their Content properly. For more information check this help article.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft R3 2016 release webinar banner
Back to Top