Syncing RadCarousel's Tooltips

3 posts, 1 answers
  1. Reid
    Reid avatar
    317 posts
    Member since:
    Oct 2008

    Posted 05 Dec 2013 Link to this post

    Hello,

    We have a custom User Control that presents custom tool icons in a RadCarousel.  The data items that are in an Observable collection and used as the Item source have a ToolTip property.  Is there an event that can be used to synchonize the Carousel's items to show that hint?

    Thanks,

    Reid
  2. Answer
    Yoan
    Admin
    Yoan avatar
    1070 posts

    Posted 06 Dec 2013 Link to this post

    Hi Reid,

    You can define style targeting CarouselItem and set its ToolTip like so:
    <Style TargetType="telerik:CarouselItem">
               <Setter Property="ToolTipService.ToolTip">
                   <Setter.Value>
                       <ToolTip>
                           <StackPanel>
                               <TextBlock Text="{Binding MyToolTip}"/>
                           </StackPanel>
                       </ToolTip>
                   </Setter.Value>
               </Setter>
           </Style>


    Regards,
    Yoan
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Reid
    Reid avatar
    317 posts
    Member since:
    Oct 2008

    Posted 06 Dec 2013 Link to this post

    Thank you Yoan, that worked fine.
    <Style TargetType="{x:Type telerik:CarouselItem}">     
                    <Setter Property="ToolTip">
                        <Setter.Value>
                            <ToolTip>
                                <StackPanel>
                                    <TextBlock Text="{Binding ToolTip.Content}"/>
                                </StackPanel>
                            </ToolTip>
                        </Setter.Value>
                    </Setter>
                </Style>

    Reid

Back to Top