By Adam Nagy
I want to change the tooltip of my ribbon button. I was hoping to do it like this:
thisCmdbutton.ToolTip.Title = tipTitle;
thisCmdbutton.ToolTip.Content = tipContent;
Unfortunately RibbonButton.ToolTip does not seem to have any string properties.
Solution
RibbonButton.ToolTip simply returns an object, but you can cast it to RibbonToolTip:
RibbonToolTip toolTip = myRibbonButton.ToolTip as RibbonToolTip;
if (toolTip == null)
return;
toolTip.Title = "New Title";
toolTip.Content = "New Content";