This question is locked. New answers and comments are not allowed.
Hi,
I've run into a problem binding controls to code-behind object properties on any RadPane that has the IsPinned property set to false.
Quick test program below; three RadPanes each with a TextBox, each bound to the Name property of a Person object. Pane 1 and 3 are pinned and correctly show the Name, Pane 2 has IsPinned set to false, and doesn't show the property when it's pinned into view.
Any ideas?
TIA.
asdasd
I've run into a problem binding controls to code-behind object properties on any RadPane that has the IsPinned property set to false.
Quick test program below; three RadPanes each with a TextBox, each bound to the Name property of a Person object. Pane 1 and 3 are pinned and correctly show the Name, Pane 2 has IsPinned set to false, and doesn't show the property when it's pinned into view.
Any ideas?
TIA.
<
controls:ChildWindow
x:Class
=
"Test.Silverlight.Views.RadPaneTest"
xmlns:controls
=
"clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
Width
=
"400"
Height
=
"300"
Title
=
"RadPaneTest"
>
<
Grid
x:Name
=
"LayoutRoot"
Margin
=
"2"
>
<
Grid.RowDefinitions
>
<
RowDefinition
/>
<
RowDefinition
Height
=
"Auto"
/>
</
Grid.RowDefinitions
>
<
telerik:RadDocking
HasDocumentHost
=
"False"
HorizontalAlignment
=
"Stretch"
Margin
=
"2"
Name
=
"rdHeader"
VerticalAlignment
=
"Stretch"
>
<
telerik:RadSplitContainer
InitialPosition
=
"DockedTop"
>
<
telerik:RadPaneGroup
Name
=
"rpgSupplier"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
>
<
telerik:RadPane
Header
=
"Pane 1"
telerik:RadDocking.SerializationTag
=
"Pane1"
>
<
TextBox
Text
=
"{Binding Path=Person.Name, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=controls:ChildWindow}}"
/>
</
telerik:RadPane
>
<
telerik:RadPane
IsPinned
=
"False"
Header
=
"Pane 2"
telerik:RadDocking.SerializationTag
=
"Pane2"
>
<
TextBox
Text
=
"{Binding Path=Person.Name, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=controls:ChildWindow}}"
/>
</
telerik:RadPane
>
<
telerik:RadPane
Header
=
"Pane 3"
telerik:RadDocking.SerializationTag
=
"Pane3"
>
<
TextBox
Text
=
"{Binding Path=Person.Name, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=controls:ChildWindow}}"
/>
</
telerik:RadPane
>
</
telerik:RadPaneGroup
>
</
telerik:RadSplitContainer
>
</
telerik:RadDocking
>
<
Button
x:Name
=
"OKButton"
Content
=
"OK"
Click
=
"OKButton_Click"
Width
=
"75"
Height
=
"23"
HorizontalAlignment
=
"Right"
Margin
=
"0,12,79,0"
Grid.Row
=
"1"
/>
<
Button
x:Name
=
"CancelButton"
Content
=
"Cancel"
Click
=
"CancelButton_Click"
Width
=
"75"
Height
=
"23"
HorizontalAlignment
=
"Right"
Margin
=
"0,12,0,0"
Grid.Row
=
"1"
/>
</
Grid
>
</
controls:ChildWindow
>
using
System.Windows;
using
System.Windows.Controls;
namespace
Test.Silverlight.Views
{
public
partial
class
RadPaneTest : ChildWindow
{
private
Person m_Person;
public
RadPaneTest()
{
InitializeComponent();
m_Person =
new
Person();
}
private
void
OKButton_Click(
object
sender, RoutedEventArgs e)
{
this
.DialogResult =
true
;
}
private
void
CancelButton_Click(
object
sender, RoutedEventArgs e)
{
this
.DialogResult =
false
;
}
public
Person Person
{
get
{
return
m_Person; }
}
}
public
class
Person
{
public
Person()
{
Name =
"Bob"
;
}
public
string
Name {
get
;
set
; }
}
}