This question is locked. New answers and comments are not allowed.
Hello,
I wanted to report a bug. I have a problem setting the Header of a RadPane after LoadLayout in the docking.
There was a thread with the same title half a year ago using Version Q2 2011.
I am using version Q3 2011 and the bug still exists.
I load the layout of a Docking and after the loading i have to set the Headers again. The loaded headers might be not correct because there might have been a language change, so the setting of headers is necessary.
The header of the RadPanes in my Page are not updated. The SerializationTag is set.
I have implemented a sample application.
The xaml:
Code behind:
Pushing the button "set Pane header" sets the header if layout was not loaded.
After saving layout and loading layout (there are the buttons to do this), the header is not updated. If I drag the Pane ot another the document host, the header is updated. I drag it in an area outside the document host, the wrong value is shown.
I can set the correct value if I use Title instead of Header to get the correct value so I have a wrkaround for this issue.
I wanted to know whether there is this bug fixed in a further version?
Thanks and kind regards,
Li
I wanted to report a bug. I have a problem setting the Header of a RadPane after LoadLayout in the docking.
There was a thread with the same title half a year ago using Version Q2 2011.
I am using version Q3 2011 and the bug still exists.
I load the layout of a Docking and after the loading i have to set the Headers again. The loaded headers might be not correct because there might have been a language change, so the setting of headers is necessary.
The header of the RadPanes in my Page are not updated. The SerializationTag is set.
I have implemented a sample application.
The xaml:
<
UserControl
x:Class
=
"Savedocking.MainPage"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
mc:Ignorable
=
"d"
d:DesignWidth
=
"640"
d:DesignHeight
=
"480"
>
<
telerik:RadDocking
x:Name
=
"MainDocking"
AllowUnsafeMode
=
"True"
>
<
telerik:RadSplitContainer
Orientation
=
"Horizontal"
InitialPosition
=
"DockedTop"
>
<
telerik:RadPaneGroup
x:Name
=
"Applications"
>
<
telerik:RadPane
x:Name
=
"ApplicationsPane"
telerik:RadDocking.SerializationTag
=
"ApplicationsPane"
Header
=
"initial value"
CanUserPin
=
"False"
CanUserClose
=
"False"
CanFloat
=
"true"
ContextMenuTemplate
=
"{x:Null}"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
></
RowDefinition
>
<
RowDefinition
></
RowDefinition
>
<
RowDefinition
></
RowDefinition
>
</
Grid.RowDefinitions
>
<
telerik:RadButton
Grid.Row
=
"0"
Content
=
"Set Pane header"
Click
=
"RadButton_Click"
></
telerik:RadButton
>
<
telerik:RadButton
Grid.Row
=
"1"
Content
=
"SaveLayout"
Click
=
"RadButton_Click_1"
></
telerik:RadButton
>
<
telerik:RadButton
Grid.Row
=
"2"
Content
=
"LoadLayout"
Click
=
"RadButton_Click_2"
></
telerik:RadButton
>
</
Grid
>
</
telerik:RadPane
>
</
telerik:RadPaneGroup
>
</
telerik:RadSplitContainer
>
</
telerik:RadDocking
>
</
UserControl
>
Code behind:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.IO;
using System.Text;
using System.Xml;
namespace Savedocking
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
}
private void RadButton_Click(object sender, RoutedEventArgs e)
{
ApplicationsPane.Header = "new value";
}
private string settings ="";
private void RadButton_Click_1(object sender, RoutedEventArgs e)
{
MemoryStream initalSettingsStream = new MemoryStream();
MainDocking.SaveLayout(initalSettingsStream, true);
initalSettingsStream.Position = 0;
byte[] result = new byte[0];
byte[] bytes = new byte[1024];
int bytesRead;
while ((bytesRead = initalSettingsStream.Read(bytes, 0, 1024)) != 0)
{
byte[] tempResult = new byte[result.Length + bytesRead];
if (result.Length > 0)
{
Array.Copy(result, 0, tempResult, 0, result.Length);
}
Array.Copy(bytes, 0, tempResult, result.Length, bytesRead);
result = tempResult;
}
settings = System.Text.Encoding.UTF8.GetString(result, 0, result.Length);
}
private void RadButton_Click_2(object sender, RoutedEventArgs e)
{
string value = settings;
if (value != null)
{
byte[] bytes = new byte[Encoding.UTF8.GetByteCount(value)];
char[] chars = value.ToCharArray();
Encoding.UTF8.GetBytes(chars, 0, chars.Length, bytes, 0);
MemoryStream stream = new MemoryStream(bytes);
XmlReader reader = XmlReader.Create(new StringReader(value));
try
{
MainDocking.LoadLayout(stream);
}
catch (Exception ex)
{
throw ex;
}
}
}
}
}
Pushing the button "set Pane header" sets the header if layout was not loaded.
After saving layout and loading layout (there are the buttons to do this), the header is not updated. If I drag the Pane ot another the document host, the header is updated. I drag it in an area outside the document host, the wrong value is shown.
I can set the correct value if I use Title instead of Header to get the correct value so I have a wrkaround for this issue.
I wanted to know whether there is this bug fixed in a further version?
Thanks and kind regards,
Li