This is a migrated thread and some comments may be shown as answers.

Add tooltip to RadRibbonView Collapse button

2 Answers 89 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Jeremiah
Top achievements
Rank 1
Jeremiah asked on 19 Mar 2012, 05:03 PM
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 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 20 Mar 2012, 11:33 AM
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 >>
0
Jeremiah
Top achievements
Rank 1
answered on 22 Mar 2012, 11:10 PM
Awesome! That worked great. 
Tags
RibbonView and RibbonWindow
Asked by
Jeremiah
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Jeremiah
Top achievements
Rank 1
Share this question
or