after save docking,documentpane's title lost

2 posts, 0 answers
  1. Wendy
    Wendy avatar
    1 posts
    Member since:
    Nov 2011

    Posted 28 Feb 2012 Link to this post

              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
  2. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 02 Mar 2012 Link to this post

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