7 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    8 posts
    Member since:
    Jun 2009

    Posted 14 May 2012 Link to this post

    Im not sure if this control is supported, but i seem to be able to use it in my SL4 app..

    What i cant seem to do is override the contenttemple, or content in XAML. Is this possible? (none of the properties seem to have any effect what is displayed).

    Im using this component because i need fine control over the duration and other propeties that the framework doesnt support out of the box.
  2. Petar Marchev
    Petar Marchev avatar
    1029 posts

    Posted 17 May 2012 Link to this post

    Hello Jonathan,

    There should be no problem to set a template for the tool tip. You need to use the ToolTipContentTemplate property of the RadToolTipService:
     <DataTemplate x:Key="myToolTipTemplate">
      <TextBlock Text="{Binding}" />
    <Grid x:Name="LayoutRoot" Background="White">
     <Rectangle Width="100" Height="100" Fill="Green"
       telerik:RadToolTipService.ToolTipContentTemplate="{StaticResource myToolTipTemplate}" />

    I have tested the code above in a Silverlight 4 project and it works as expected. 

    Petar Marchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Ken
    Ken avatar
    104 posts
    Member since:
    Aug 2010

    Posted 19 Jul 2012 Link to this post

    I've observed a strange behavior of tooltips when using the RadToolTipService versus the out-of-the-box one.

    We have some elements with tooltips which sometimes become "obscured", i.e. there's an "overlay" (rectangle with some opacity) painted over them. When this overlay is visible and you hover over an element "underneath" it, normally a tooltip should not be shown (as you're actually hovering over the rectangle, not the element with which the tooltip is associated):
    • with the standard ToolTipService, no tooltip is shown - correct
    • with the RadToolTipService, tooltips appear - wrong

    Any idea why this might happen...or maybe it's intentional?


    p.s.: looking in the code, it looks like this is because the mousemove event is hooked on the root visual and in the handler the coordinates of the tooltip-enabled elements are checked directly. Any reason why mouseenter/leave are not hooked on the tooltip-enabled elements themselves? Or...why ALL the elements returned by GetElementsInHostCoordinates() are taken into account and not just the first/topmost one?
  4. Ken
    Ken avatar
    104 posts
    Member since:
    Aug 2010

    Posted 20 Jul 2012 Link to this post

    I tried to change to the code in RadToolTipService so that in the MouseMove handler I would somehow determine if the element is "obscured" or not. Turns out, there is no way to do this.

    So, I removed the MouseMove hook on RootVisual altogether and instead, on the SetToolTipContent() call, I hook the MouseEnter/MouseLeave events of the tooltip owner and call the OnMouseEnterElement()/OnMouseLeaveElement() methods. This seems to work fine. 

    Could you please give me some feedback whether this is a feasible approach? Or maybe you already know some drawback to it (since you didn't choose to use it)?

  5. Yavor
    Yavor avatar
    401 posts

    Posted 23 Jul 2012 Link to this post

    Hi Adrian,

    RadToolTip service was designed to create a feature rich framework for tooltips for our controls that works the same way both in Silverlight and WPF. It is important to note that it is not a standalone product and it was created to support the radcontrols infrastructure, therefore we cannot provide support for its usages outside radcontrols. However you can still use it in you application but with no guarantees.

    The reason why we choose to use mouse move on the root visual instead of mouse enter / leave was because of scenarios with nested items (the treemap) in which the framework way of showing tooltips doesn't work correctly. The RadToolTip can be used separately from the RadToolTipService, so you can write your own code that opens a radToolTip.

    Hope this information helps!

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Davor
    Davor avatar
    3 posts
    Member since:
    Jul 2013

    Posted 27 Aug 2013 Link to this post

    Hi, i know this is an old topic, but i'm wondering how can i access tha datatemplate i have stored in the XAML
    lik this:
            <DataTemplate x:Key="myToolTip">           
                        <TextBlock Text="{Binding Path=Head}"
                        <Button Content="X"
                            <TextBlock Text="{Binding Path=Body}"
                                       Height="relative" />

    But now i wish to access this template from code using the 


    Could i get an example of usage, please?
  7. Ves
    Ves avatar
    2926 posts

    Posted 30 Aug 2013 Link to this post

    Hi Davor,

    I am not sure I followed you completely. Do you need to retrieve the DataTemplate from the user control resources? You can get it like this:


    Best regards,
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top