This is a migrated thread and some comments may be shown as answers.

Can't set RadPane.Header programatically after LoadLayout

7 Answers 230 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Gareth
Top achievements
Rank 1
Gareth asked on 07 Nov 2011, 02:59 PM
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

7 Answers, 1 is accepted

Sort by
0
Jan
Top achievements
Rank 1
answered on 09 Nov 2011, 11:28 AM
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

0
George
Telerik team
answered on 10 Nov 2011, 01:32 PM
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 >>

0
Gareth
Top achievements
Rank 1
answered on 07 Dec 2011, 02:59 PM
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.
0
George
Telerik team
answered on 12 Dec 2011, 01:58 PM
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 >>

0
Valerie
Top achievements
Rank 1
answered on 10 Jan 2013, 09:26 PM
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.
0
Valerie
Top achievements
Rank 1
answered on 10 Jan 2013, 11:23 PM
I see that you fixed this ticket in 2012 Q2 but only for Silverlight. Can you please submit another ticket for WPF. Thanks
0
George
Telerik team
answered on 15 Jan 2013, 04:19 PM
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.

Tags
Docking
Asked by
Gareth
Top achievements
Rank 1
Answers by
Jan
Top achievements
Rank 1
George
Telerik team
Gareth
Top achievements
Rank 1
Valerie
Top achievements
Rank 1
Share this question
or