Hi there,
I have a DataTemplate that is added as TitleTemplate to a RadDocumentPane - as you see below. So I need to access to RadToggleButton which is inside my DataTemplate in code behind, can you please tell me how can i do that?
<
Window.Resources
>
<
DataTemplate
x:Key
=
"SyncTemplate"
>
<
Grid
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
/>
</
Grid.ColumnDefinitions
>
<
ContentPresenter
Content
=
"{Binding}"
Margin
=
"0,5,0,0"
/>
<
telerik:RadToggleButton
x:Name
=
"xScrollSync"
Grid.Column
=
"1"
HorizontalAlignment
=
"Right"
Content
=
"XScroll Sync"
Width
=
"75"
/>
</
Grid
>
</
DataTemplate
>
</
Window.Resources
>
<
Grid
>
<
telerik:RadDocking
Margin
=
"0 60 0 30"
HorizontalAlignment
=
"Stretch"
Height
=
"auto"
HasDocumentHost
=
"False"
Width
=
"auto"
VerticalAlignment
=
"Stretch"
>
<
telerik:RadSplitContainer
telerik:ProportionalStackPanel.RelativeSize
=
"1000, 200"
>
<
telerik:RadSplitContainer
x:Name
=
"ganttViewSplit"
InitialPosition
=
"DockedLeft"
HorizontalAlignment
=
"Stretch"
Height
=
"auto"
VerticalAlignment
=
"Stretch"
telerik:ProportionalStackPanel.RelativeSize
=
"800,200"
>
<
telerik:RadPaneGroup
>
<
telerik:RadDocumentPane
x:Name
=
"ganttDoc"
TitleTemplate
=
"{StaticResource SyncTemplate}"
>
<
telerik:RadDocumentPane.Content
>
<
Grid
>
</
Grid
>
</
telerik:RadDocumentPane.Content
>
</
telerik:RadDocumentPane
>
</
telerik:RadPaneGroup
>
</
telerik:RadSplitContainer
>
</
telerik:RadDocking
>
</Grid>