Listbox Drag & Drop Example - Tooltip

2 posts, 0 answers
  1. ITA
    ITA avatar
    383 posts
    Member since:
    Aug 2009

    Posted 18 May 2012 Link to this post


    i'm using the Listbox Drag & Drop example as base of my ListBox. I use also a ItemTEmplate + DataTemplate. But how do i add my own TooltipTemplate to the ListboxItems?

    i found an example for a tooltip template:

    <Style x:Key="{x:Type ToolTip}" TargetType="ToolTip">
                <Setter Property="OverridesDefaultStyle" Value="true"/>
                <Setter Property="HasDropShadow" Value="True"/>
                <Setter Property="Template">
                        <ControlTemplate TargetType="ToolTip">
                            <Border CornerRadius="7" HorizontalAlignment="Center" VerticalAlignment="Top" Padding="5" BorderThickness="3,3,3,3">
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#CF181818" Offset="0"/>
                                        <GradientStop Color="#BE1C1C1C" Offset="1"/>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#80FFFFFF" Offset="0"/>
                                        <GradientStop Color="#7FFFFFFF" Offset="1"/>
                                        <GradientStop Color="#FFFFF18D" Offset="0.344"/>
                                        <GradientStop Color="#FFFFF4AB" Offset="0.647"/>
                                    <TextBlock FontFamily="Tahoma" FontSize="11" Text="{Binding Name}" Foreground="#FFFFFFFF" />

    But how bin this Template to my DataItems?

  2. George
    George avatar
    1332 posts

    Posted 29 May 2012 Link to this post

    Hi Rene,

    You don't need to change the ControlTemplate for the ToolTip. I would suggest setting the ToolTip using Implicit style for the RadListBoxItem, for example:

    <Style TargetType="telerik:RadListBoxItem">
                <Setter Property="ToolTip">
                        <!--Place here the tooltip content-->

    Hope this helps.

    All the best,
    the Telerik team

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

Back to Top