Hi,
how can I hide a tool in the ribbonbar? I don`t find a property 'IsVisible' or 'Visibility'.
Regards
Marco
Hello Marco,
Let Us know if you have any questions with this matter.
Thanks
HI,
is this on your feature list or not?
Works great . Thanks very much.
Milos
to find a tool by Id, you can simply use FindToolById() method of the ribbon:
string ribbons = "Pretraga";((RibbonTool)XamRibbon1.FindToolById(ribbons)).IsEnabled = false;
Hope this helps,
How I can set tools isEnable = false
I can not set directly XamRibbon1 tools isEnabled=false
something like this
private void XamRibbon1_Loaded(object sender, RoutedEventArgs e) { string ribbons = "Pretraga"; for (int i = 0; i<XamRibbon1.Tabs.Count; i++) { for (int j = 0; j<XamRibbon1.Tabs[i].Groups.Count ; j++) { for (int k = 0; k<XamRibbon1.Tabs[i].Groups[j].Tools.Count; k++) { if (XamRibbon1.Tabs[i].Groups[j].Tools[k].Id.ToString() == ribbons) { XamRibbon1.Tabs[i].Groups[j].Tools[k]. isEnabled=false ???????????? } } } } }
OK, thank you. I do this so.
Hi Marco,
Could you provide some more details about your scenario? Why do you need to hide a tool inside the ribbon?
There are strict guidelines from MSFT, describing how a Ribbon control should look and behave.
Hiding a tool in the Ribbon is against the rules - the tools on the ribbon must not change as a result of user interaction in the document.
You should disable the tools by setting their IsEnabled property to "false" instead of hiding them.
Hope that helps,