Problems with the Pane DocumentHost when LoadLayout

6 posts, 0 answers
  1. Weliton Flor
    Weliton Flor avatar
    12 posts
    Member since:
    Oct 2009

    Posted 26 Mar 2010 Link to this post

    Hello,

    First save the layout with DocumentHost panes.

    Close Browser, and run application again.

    When LoadLayout, the Panes which are in DocumentHost are inverted with the header, see the image attached.

    Thanks
  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 30 Mar 2010 Link to this post

    Hello Weliton,

     This only happens if you didn't set the RadDocking.SerailizationTag attached property to the pane. If you don't set this property the Save/Load layout won't be able to load the content of the pane as well so most probably you will need to set this property. For more information about how to use the Save/Load layout feature of the Docking control you could refer to the following blog post: http://blogs.telerik.com/miroslavnedyalkov/posts/09-04-22/raddocking_save_load_layout.aspx

    We will fix the problem for one of the upcoming releases.

    Kind regards,
    Miroslav Nedyalkov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Weliton Flor
    Weliton Flor avatar
    12 posts
    Member since:
    Oct 2009

    Posted 30 Mar 2010 Link to this post

    Hello,

    I'm already doing this, set the SerializationTag for all windows.

    You have an example of DocumentHost save, close the browser and reopen when it loads correctly?

    Thanks
  4. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 31 Mar 2010 Link to this post

    Hello Weliton,

    What I observed is that the panes with no serialization tag behave like you said, but these with serialization tag set behave correctly. Please find the attached project.

    Regards,
    Miroslav Nedyalkov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. Weliton Flor
    Weliton Flor avatar
    12 posts
    Member since:
    Oct 2009

    Posted 31 Mar 2010 Link to this post

    Hello,

    I tried putting the SerializationTag but do not work.

    I am sending a sample (download here), do the following:

    - Run the project
    - Create a Pane
    - Save the Layout
    - Close the project

    - Rerun the project
    - Load the layout
    ** At this point the problem will occur.

    Thanks
  6. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 01 Apr 2010 Link to this post

    Hi Weliton,

     Now I was able to reproduce the issue and was able to find a work-around. What I did was to change the code of the Area_ElementLoaded method to the following:

    private void Area_ElementLoaded(object sender, LayoutSerializationEventArgs e)
    {
        if (e.AffectedElement.GetType().Name == "RadPane")
        {
            var pane = (RadPane)e.AffectedElement;
            pane.Content = new Control1();
            pane.Dispatcher.BeginInvoke(() =>
                {
                    if (pane.IsInDocumentHost)
                    {
                        pane.Template = ((RadPane)e.AffectedElement).DocumentHostTemplate;
                    }
                });
        }
    }

    I will log the issue and we will fix it for one of the upcoming releases.

    Best wishes,
    Miroslav Nedyalkov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top