ToolTip on RadMenuItem

2 posts, 1 answers
  1. Michael
    Michael avatar
    12 posts
    Member since:
    Apr 2009

    Posted 07 Jun 2009 Link to this post

    Hello,

    I am attempting to add a ToolTip to a RadMenuItem. Here is my XAML:

     

    <telerikNavigation:RadMenu x:Name="ToolBar" >

     

    <telerikNavigation:RadMenuItem Header="New" ToolTipService.ToolTip="Create a new project" />

     

    </telerikNavigation:RadMenu>

     


    However when I run it, I get this execption:
    "Unknown attribute ToolTipService.ToolTip on element RadMenuItem."

    Obviously I can edit the template and place a ToolTip on an element, however, in my case I will have several RadMenuItems. How can I make a Template that I can reuse and still have a different ToolTip (of my choosing) on each of them?

    Thanks
    ~Michael
  2. Answer
    Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 08 Jun 2009 Link to this post

    Hi Michael,

    This is know Silverlight limitation. You need to add System.Windows.Controls namespace and prefix the tooltip service in order to use it.
    Here is an example:

    <UserControl x:Class="SilverlightApplication49.Page" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:nav="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" 
        xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows" 
        Width="400" Height="300">  
        <Grid x:Name="LayoutRoot" Background="White">  
            <nav:RadMenu VerticalAlignment="Top">  
                <nav:RadMenuItem Header="File" controls:ToolTipService.ToolTip="I'm ToolTip" /> 
            </nav:RadMenu> 
        </Grid> 
    </UserControl> 

    Let us know if you need mode information.

    Kind regards,
    Hristo
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
Back to Top