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

Tooltip template not showing image

2 Answers 65 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 16 Dec 2014, 08:50 PM
I've taken a look at your Tooltip demo (http://demos.telerik.com/silverlight/#ToolTip/FirstLook), but I'm not sure how to implement my tooltip image.  What I'm trying to do seems simple enough, hover over some control and display a dynamic image.  Currently, I don't see anything at all when I hover over my grid cell.

Within my DataTemplate I have 2 stack panels.  One will be visible at a time, and one of those has a ToolTipContentTemplate to display an image.  Unfortunately, nothing is visible.   Originally, I had all my ToolTipService code within my TextBlock, but in the attached image, it's currently on the StackPanel.
My image has a relative path to my Silverlight app, and I know that this works. 

It's been a LONG time since I've worked with Silverlight, so I'm not sure what I'm missing...  Hope you can help!

Thank you!

2 Answers, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 18 Dec 2014, 04:13 PM
<telerik:RadButton x:Name="ShowImageButton"
 Command = "{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=telerikGrid:RadGridView}, Path=DataContext.ShowImageCommand}"
 Content="Click for Image" >
 </telerik:RadButton>

I changed the tooltip into a button so I could actively be involved with the event firing.  Using the above code I could have my button within a datatemplate, and still wire it up successfully to hit my viewModel (MVVM).
0
Pavel R. Pavlov
Telerik team
answered on 19 Dec 2014, 03:28 PM
Hello Richard,

I am not completely sure why this can happen but one possible reason is binding failure. Even if you have set the ContentTemplate it will not be applied if you have not set Content. This is why I would like to ask you to check if the binding to the ToolTipContent if properly applied. I attached the project I tested the scenario with and the code works as expected - the tooltip is visualized. 

Can you change the code so that the issue can be reproduced with the project?

Regards,
Pavel R. Pavlov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ToolTip
Asked by
Richard
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Pavel R. Pavlov
Telerik team
Share this question
or