This is a migrated thread and some comments may be shown as answers.

How to acces element in TitleTemplate of RadPane

1 Answer 69 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Stefan Babinec
Top achievements
Rank 1
Stefan Babinec asked on 14 Apr 2010, 11:02 AM
Hello.

I have trouble to programatically acces element in TitleTemplate of RadPane.
I have this following style applied to my RadPane, where is also specified the DataTemplate of TitleTemplate.
For example I would like to acces the "PART_ParentControls" element. Can you please help me ?
Thanks a lot.
Here is the style xaml:

   <Style x:Key="TelerikRadPaneStyle1" TargetType="{x:Type telDockingControls:RadPane}">
        <Setter Property="CanUserPin" Value="False" />
        <Setter Property="CanFloat" Value="True" />
        <Setter Property="CanUserClose" Value="False" />
        <Setter Property="ContextMenuTemplate">
            <Setter.Value>
                <DataTemplate>
                    <telNavigationControls:RadContextMenu Visibility="Collapsed" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="TitleTemplate">
            <Setter.Value>
                <DataTemplate >
                    <Grid x:Name="mainGrid">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="20" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <Border BorderThickness="1" BorderBrush="Black" Margin="0,5,2,5" >
                            <Canvas Grid.Column="0" Background="White" Opacity="1" IsHitTestVisible="True" ToolTip="Drag to move the window" />
                        </Border>
                        
                         <breadCrumbBar:BreadcrumbBar x:Name="bar" Grid.Column="1" Margin="1" Path="News"
                                                            TraceBinding="{Binding XPath=@title}" BorderBrush="{x:Null}"
                                                            Root="{StaticResource dataProvider}" Background="Transparent"
                                                            >
                            <breadCrumbBar:BreadcrumbBar.PreButtons>
                                <Button>
                                    <Image Style="{StaticResource Backward}" Opacity="0.8" Width="16" Height="16"/>
                                </Button>
                                <Button>
                                    <Image Style="{StaticResource Forward}" Opacity="0.8" Width="16" Height="16"/>
                                </Button>
                            </breadCrumbBar:BreadcrumbBar.PreButtons>
                            <breadCrumbBar:BreadcrumbBar.Buttons>
                                <Button>
                                    <Image Style="{StaticResource Close}" Opacity="0.5" Width="16" Height="16" HorizontalAlignment="Right"/>
                                </Button>
                            </breadCrumbBar:BreadcrumbBar.Buttons>
                        </breadCrumbBar:BreadcrumbBar>
                        
                        <Grid Grid.Column="2" x:Name="PART_ParentControls" />
                        
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>

1 Answer, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 15 Apr 2010, 02:34 PM
Hi Stefan,

 I'm closing this thread, because there is another thread with the same post. The link is http://www.telerik.com/community/forums/wpf/docking/how-to-acces-element-in-titletemplate-of-radpane-second-try.aspx.

All the best,
Miroslav Nedyalkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Docking
Asked by
Stefan Babinec
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Share this question
or