This question is locked. New answers and comments are not allowed.
I tried to change Header and Item Templates of RadPane to add a button which does Pin/Unpin functionality.
When I use it on individual RadPane Element, it works perfectly.
In my scenario, I need these same functionality wherever I use radpane across my application. It doesn't work if I create a style and access as a static resource.
Could you please help me in getting this resolved.
Thanks
Raki
When I use it on individual RadPane Element, it works perfectly.
In my scenario, I need these same functionality wherever I use radpane across my application. It doesn't work if I create a style and access as a static resource.
Could you please help me in getting this resolved.
<
telerik:RadPane.HeaderTemplate
>
<
DataTemplate
>
<
Border
BorderBrush
=
"#FF2C2B2B"
BorderThickness
=
"0"
CornerRadius
=
"5,5,0,0"
Background
=
"{StaticResource HeaderBrush}"
Margin
=
"-3,-5"
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
TextBlock
Text
=
"{Binding}"
Style
=
"{StaticResource HeaderTextStyle}"
Padding
=
"5"
/>
<
telerik:RadButton
x:Name
=
"HeaderPinButton"
CommandParameter
=
"{Binding SelectedPane, RelativeSource={RelativeSource TemplatedParent}}"
Command
=
"telerik:RadDockingCommands.Pin"
Content
=
"Pin"
/>
</
StackPanel
>
</
Border
>
</
DataTemplate
>
</
telerik:RadPane.HeaderTemplate
>
<
telerik:RadPane.TitleTemplate
>
<
DataTemplate
>
<
Border
BorderBrush
=
"#FF2C2B2B"
BorderThickness
=
"0"
CornerRadius
=
"5,5,0,0"
Background
=
"{StaticResource HeaderBrush}"
Margin
=
"-4,-2"
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
ContentPresenter
Content
=
"{Binding}"
>
<
ContentPresenter.ContentTemplate
>
<
DataTemplate
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
TextBlock
Text
=
"{Binding}"
Style
=
"{StaticResource HeaderTextStyle}"
Padding
=
"5"
/>
<
telerik:RadButton
x:Name
=
"HeaderUnPinButton"
CommandParameter
=
"{Binding SelectedPane, RelativeSource={RelativeSource TemplatedParent}}"
Command
=
"telerik:RadDockingCommands.Pin"
Content
=
"Unpin"
/>
</
StackPanel
>
</
DataTemplate
>
</
ContentPresenter.ContentTemplate
>
</
ContentPresenter
>
</
StackPanel
>
</
Border
>
</
DataTemplate
>
</
telerik:RadPane.TitleTemplate
>
Thanks
Raki