Find RadPane after LoadLayout

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

    Posted 18 Mar 2010 Link to this post

    Hello,

    I'm creating a RadPane and Save the Layout. 
    When I click the button to create this RadPane again, first I check if already been created and not re-created, just set Focus().

    When I open the application, collects the serialized layout and performs LoadLayout(). It works without problems. 
    When I click to open the RadPane and try to find but does not work, will only work when I change the state of RadPane, for example, leave it floating and dock again.

    Tks
  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 19 Mar 2010 Link to this post

    Hello Weliton,

     Could you please provide a sample project that demonstrates the issue and a step-by-step instructions how to reproduce it - this will help us better understand what the problem is and assist you fixing it.

    You could also refer to the following blog post that corresponds to your scenario: http://blogs.telerik.com/miroslavnedyalkov/posts/10-03-04/how_to_activate_a_pane_in_the_telerik_docking_control_for_wpf_and_silverlight.aspx.

    Greetings,
    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 19 Mar 2010 Link to this post

    Here is a sample project. 
    Download here DOWNLOAD PROJECT

    When I click on Open Pane, the application first checks if there is, if exists, creates a pane, if not exists, simply calls the method Focus ().

    When I create a pane, unpinned and save the layout, close the application, open again and try to load layout. Aftet, try to Open Pane, not find the pane.

    Tks
  4. Weliton Flor
    Weliton Flor avatar
    12 posts
    Member since:
    Oct 2009

    Posted 22 Mar 2010 Link to this post

    Can someone help me?
  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 24 Mar 2010 Link to this post

    Hello Weliton,

     What you need to do to fix this problem is to set the SerializationTag attached property to the group, you are referencing in the code-behind.

    Sincerely yours,
    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.
  6. Weliton Flor
    Weliton Flor avatar
    12 posts
    Member since:
    Oct 2009

    Posted 24 Mar 2010 Link to this post

    Hi, 

    I include SerializationTAG in Group, but now, when I try to open page, is not finding and create new pane and gets two panes in the same place, .

    Here is a sample project with SerializationTAG. 
    Download here DOWNLOAD PROJECT

    Tks.
  7. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 25 Mar 2010 Link to this post

    Hello Weliton,

     I tried the project you sent, but seems that it works as expected. Could you please tell us what do you think is not working correctly? I went trough the code using your break points and it seems that creates the pane only when there is no pane in the docking with this name.

    If you could send us a step-by-step instructions what you and what you expect to happen every step this would be very helpful.

    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.
  8. Weliton Flor
    Weliton Flor avatar
    12 posts
    Member since:
    Oct 2009

    Posted 25 Mar 2010 Link to this post

    OK,

    - First I run the application on Browser.
    - Create PANE and SaveLayout

    - Close Browser

    - Run Application again
    - LoadLayout

    -- After, when I try to create PANE, can´t find PANE saved.
  9. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 25 Mar 2010 Link to this post

    Hi Weliton,

     Now I see. The problem is that when the Docking control is loading the layout, it cannot find your pane in the default docking to associate it with the loaded pane (with the SerializationTag) and creates an empty pane with the saved settings. What you need to do to override this behavior is to handle the ElementLoading event of the Docking control and to use the event args to create your pane. Please find the attached project - I edited your project and fixed this issue.

    One more thing - I noticed that you are using a memory stream in order to save or load the layout. You don't need to do this - you could use directly the isolated storage file stream. I changed this in the example to demonstrate the idea.

    Hope this helps!

    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.
Back to Top