Can't set RadPane.Header programatically after LoadLayout

8 posts, 0 answers
  1. Gareth
    Gareth avatar
    4 posts
    Member since:
    Apr 2009

    Posted 07 Nov 2011 Link to this post

    Hi guys,

    Here's the scenario:

    1. Three panes, each with their own Header text set in XAML
    2. Programatically set RadPane.Header to change the pane header text. This works fine.
    3. Save the layout to Iso storage
    4. Refresh page. LoadLayout is called on RadDocking.IsLoaded
    5. Panes are loaded back in with the Header texts that were set before saving. This is not desired, but not really a problem.
    6. Attempt to set RadPane.Header again on any pane. The text will not change.
    7. However, if a Pane is auto-hidden, the Header text changes in the pinned pane's tab, so it looks like setting RadPane.Header is working, just not updating in the actual pane headers.

    Using version 2011.2.1031.1040
  2. Jan
    Jan avatar
    1 posts
    Member since:
    Oct 2011

    Posted 09 Nov 2011 Link to this post

    Hi Gareth,

    I have a similar problem and at the moment I just unpin and pin the pane. But it is a bug I think.

    Greets
    Jan

  3. DevCraft banner
  4. George
    Admin
    George avatar
    1332 posts

    Posted 10 Nov 2011 Link to this post

    Hi Jan,

    Thank you for contacting us.

    I would suggest setting a SerializationTag attached property to the RadPane. When the layout is loaded, all Docking parts are generated (created) and the objects defined in the xaml are not the same after the load. But we keep the instances if you set serialization tag, and in this way you will be able to change the pane header. Please, refer to the attached project that demonstrates this behavior. 

    I hope this helps.

    Kind regards,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  5. Gareth
    Gareth avatar
    4 posts
    Member since:
    Apr 2009

    Posted 07 Dec 2011 Link to this post

    The bug doesn't seem to affect Document Panes, only standard RadPanes.

    I amended your above solution to change the header of the normal RadPane as follows:

    <telerik:RadDocking x:Name="dock" Margin="0 30 0 0">
                <telerik:RadDocking.DocumentHost>
                    <telerik:RadSplitContainer>
                        <telerik:RadPaneGroup>
                            <telerik:RadPane x:Name="docPane" Header="document" telerik:RadDocking.SerializationTag="dockPane"/>
                        </telerik:RadPaneGroup>
                    </telerik:RadSplitContainer>
                </telerik:RadDocking.DocumentHost>
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup >
                        <telerik:RadPane x:Name="pane1" Header="pane" telerik:RadDocking.SerializationTag="dockNormalPane"/>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
            </telerik:RadDocking>


    private void Button_Click(object sender, RoutedEventArgs e)
            {
                this.docPane.Header = "document" + ++count;
                this.pane1.Header = "pane" + ++count;
            }

    Clicking "Change header" after a save/load will no longer change the header of the RadPane.
  6. George
    Admin
    George avatar
    1332 posts

    Posted 12 Dec 2011 Link to this post

    Hello Gareth,

    We can confirm that this is a bug in our control and we will fix it in our further development. Meanwhile, I would suggest using the RadPane.Title property instead of RadPane.Header.

    I hope this suits your needs.

    All the best,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  7. Valerie
    Valerie avatar
    36 posts
    Member since:
    Nov 2011

    Posted 10 Jan 2013 Link to this post

    I have the same problem so I changed it from Header to Title but it has the same problem. I am using version 2012.3.1129.40 of the WPF product.
  8. Valerie
    Valerie avatar
    36 posts
    Member since:
    Nov 2011

    Posted 10 Jan 2013 Link to this post

    I see that you fixed this ticket in 2012 Q2 but only for Silverlight. Can you please submit another ticket for WPF. Thanks
  9. George
    Admin
    George avatar
    1332 posts

    Posted 15 Jan 2013 Link to this post

    Hi Valerie,

    I tried the given scenario with a sample WPF project and I was unable to reproduce this issue with the 2012.3.1129.40 version. You can find the attached project which is used for testing the given scenario. Could you please give it a try and let me know if I missed something.

    i am glad to assist you further.

    Regards,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
DevCraft banner