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

after save docking,documentpane's title lost

1 Answer 37 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Wendy
Top achievements
Rank 1
Wendy asked on 28 Feb 2012, 10:09 AM
          private string SaveLayoutAsString()
        {
            MemoryStream stream = new MemoryStream();
            this.Docking.SaveLayout(stream);
  
            stream.Seek(0, SeekOrigin.Begin);
  
            StreamReader reader = new StreamReader(stream);
            return reader.ReadToEnd();
        }
  
        private void LoadLayoutFromString(string xml)
        {
            using (Stream stream = new MemoryStream(Encoding.UTF8.GetBytes(xml)))
            {
                stream.Seek(0, SeekOrigin.Begin);
                this.Docking.LoadLayout(stream);
            }
        }
  
        private void LoadTest_Click(object sender, RoutedEventArgs e)
        {
             LoadLayoutFromString(this.XmlTextBox.Text);
        }
  
        private void SaveLayoutTest_Click(object sender, RoutedEventArgs e)
        {
            this.XmlTextBox.Text = SaveLayoutAsString();
        }
<
telerik:RadDocking x:Name="Docking"
                    Grid.Row="1"
                    BorderThickness="0"
                    Padding="0">
    <telerik:RadDocking.DocumentHost>
        <telerik:RadSplitContainer>
            <telerik:RadPaneGroup x:Name="DocumentGroup">
                <telerik:RadPane x:Name="LayoutXml"
                                 Header="Layout Xml"
                                 telerik:RadDocking.SerializationTag="LayoutXml"
                                 telerik:RadDocking.FloatingSize="450, 400">
                    <TextBox TextWrapping="Wrap"
                             Grid.Row="2"
                             x:Name="XmlTextBox"
                             Background="#19F4F4F5"
                             VerticalScrollBarVisibility="Auto"/>
                </telerik:RadPane>
                <telerik:RadDocumentPane Header="Document 1"
                                         Title="Document 1"
                                         telerik:RadDocking.SerializationTag="DocumentPane">
                    <TextBox x:Name="DocumentTextBox"
                             Text="Some text"
                             Background="#19F4F4F5" />
                </telerik:RadDocumentPane>
            </telerik:RadPaneGroup>
        </telerik:RadSplitContainer>
    </telerik:RadDocking.DocumentHost>
</telerik:RadDocking>

code as same as demo,i think code is ok,but don't understand why do not show title???
i drag RadDocumentPane,title is show

1 Answer, 1 is accepted

Sort by
0
Boyan
Telerik team
answered on 02 Mar 2012, 04:29 PM
Hi Wendy,

We had a similar bug in the previous release  2011.3.1220 and it should be fixed in the latest version of the controls -2012.1 215. Could you please give it a try. I have attached a project with the latest binaries included that is working fine at my side.

Kind regards,
Boyan
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Docking
Asked by
Wendy
Top achievements
Rank 1
Answers by
Boyan
Telerik team
Share this question
or