Add tooltip to RadRibbonView Collapse button

3 posts, 0 answers
  1. Jeremiah
    Jeremiah avatar
    3 posts
    Member since:
    Mar 2012

    Posted 19 Mar 2012 Link to this post

    Is there a way to add a tooltip to the collapse ribbon button? Preferably to have it say "Collapse the toolbar" when the ribbon is visible and "Show the toolbar" when it is collapsed.
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 20 Mar 2012 Link to this post

    Hello Jeremiah,

     You have to extract / get the default Style/Tempalte of the RadRibbonView and play with the MinimizeButton
    (the green lines are new ones):

    <telerik:RadRibbonToggleButton x:Name="MinimizeButton"
                                                                       ToolTipService.ToolTip="{Binding IsMinimized, RelativeSource={RelativeSource TemplatedParent} , Converter={StaticResource converter}}"
                                                                       IsChecked="{Binding IsMinimized, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                                                       IsEnabled="{TemplateBinding IsMinimizable}" Style="{TemplateBinding MinimizeButtonStyle}"
                                                                       Visibility="{TemplateBinding MinimizeButtonVisibility}"/>
     The converter looks like so:
    public class BoolToStringConverter : IValueConverter
       {
           public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
           {
              var isRibbonOpened = value as bool?;
              if (isRibbonOpened.HasValue)
              {
                  if (isRibbonOpened == true)
                  {
                      return "Show the RibbonView";
                  }
                  else
                  {
                      return "Collapse the RibbonView";
                  }
              }
               return "";
           }
    You can find this realized in the attached solution. Greetings,
    Petar Mladenov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. Jeremiah
    Jeremiah avatar
    3 posts
    Member since:
    Mar 2012

    Posted 22 Mar 2012 Link to this post

    Awesome! That worked great. 
Back to Top