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

Tooltip for Image inside Headertemplate

1 Answer 83 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Raj
Top achievements
Rank 1
Raj asked on 25 Apr 2013, 02:41 PM
Hi,
I would like to bind a property to an Image present in a headertemplate and a title template
I tried by providing elementname, relative source, no luck!

Please help.
The scenario is:
 <telerik:RadPane.TitleTemplate>
  <DataTemplate>
  
 <StackPanel>
  <Image Name="Sample">
                                                                                               <Image.ToolTip>
                                                    <ToolTip></ToolTip>
                                                </Image.ToolTip>
                                            </Image>

1 Answer, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 30 Apr 2013, 01:21 PM
Hi,

I am not sure I understand you correctly but if you just want to customize the TitleTemplate and add a image to it all you need to do is place the Image control and a TextBlock which Text property is bound with Binding inside a DataTemplate and set it to the TitleTemplate. The next code snippet shows the described approach:
<telerik:RadSplitContainer>
    <telerik:RadPaneGroup>
        <telerik:RadPane Header="Pane 1" Title="Title 1">
            <telerik:RadPane.TitleTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Image Source="img\sun.png" Margin="2" VerticalAlignment="Center">
                            <Image.ToolTip>
                                <TextBlock Text="Sun"/>
                            </Image.ToolTip>
                        </Image>
                        <TextBlock Text="{Binding}" Margin="5 0 0 0" VerticalAlignment="Center"/>
                    </StackPanel>
                </DataTemplate>
            </telerik:RadPane.TitleTemplate>
        </telerik:RadPane>
    </telerik:RadPaneGroup>
</telerik:RadSplitContainer>

where the Image Source is the correct source of the image, hope this is helpful.

Greetings,
Vladi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Docking
Asked by
Raj
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Share this question
or