In Microsoft office the applications have a "help" button and a "minimize ribbon" button, just bellow the (minimize, restore, close) button bar.
I have been looking on how to add buttons there in the XamRibbon, but i just can't find it. I need to add a button for help and one for feedback.
I am new using the Infragistics ribbon, so i was checking this page http://es.infragistics.com/products/wpf/sample/ribbon/application-menu, but I could not find what I needed.
Any help will be appreciated! Thank you!
Thanks Anastas for your answer!
If I understand correctly I have to add a button like the one you describe before the help one.
I assume that the Source="help_icon.gif" you put it is just a mistake no?
I tested this command and it minimizes the ribbon as you indicated. But how would you implement the image? I mean the minizing ribbon button changes image according to its state (if it minimized or not).
Thanks for your comments!
Hi,
You can add another button in the stack panel, just right above the HelpIcon button(above in xaml code). And set the minimizing ribbon's command to it:
<Button Background="Transparent" BorderBrush="Transparent" Command="igRibbon:RibbonCommands.ToggleRibbonMinimizedState"> <Image Source="help_icon.gif" Width="16" Height="16"/> </Button>
Hope this is helpful for you.
Anastas
When you pointed that out, I realized my mistake. Thank you!
You have been extremely helpful. But we are still encountering a problem.
Next to the help button we need a minimize ribbon. We have been looking around how to implement this. But we will appreciate any suggestions you can give us.
Thanks in advance!
Hi Viviana,
Thank you for your feedback. You need to add my code in the resources of the XamRibbon instead of the XamRibbonWindow
<igRibbon:XamRibbon x:Name="xamRibbon" Theme="[current]">
<igRibbon:XamRibbon.Resources>
…..
</gRibbon:XamRibbon.Resources>
Let me know, if you need any further assistance on this matter.
Hi Yanko! Thansk again for your answer.
I have been trying to implement what you suggested, but I am encountering many issues. Maybe you can help me out.
<igRibbon:XamRibbonWindow x:Class="RibbonWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:igRibbon="http://infragistics.com/Ribbon" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:igWPF="http://schemas.infragistics.com/xaml/wpf" mc:Ignorable="d" d:DesignHeight="600" d:DesignWidth="800" WindowState="Maximized">
<igRibbon:XamRibbonWindow.Resources>
//I added your code here
//There is some data templates
</igRibbon:XamRibbonWindow.Resources>
<igRibbon:RibbonWindowContentHost x:Name="ribbonWindowContentHost" > <igRibbon:RibbonWindowContentHost.Ribbon> <igRibbon:XamRibbon x:Name="xamRibbon" Theme="[current]"> <igRibbon:XamRibbon.ApplicationMenu> <igRibbon:ApplicationMenu> <igRibbon:ApplicationMenu.FooterToolbar> <igRibbon:ApplicationMenuFooterToolbar> <igRibbon:ButtonTool Name="appMenuOptions" Caption="Opt_ions"/> </igRibbon:ApplicationMenuFooterToolbar> </igRibbon:ApplicationMenu.FooterToolbar> </igRibbon:ApplicationMenu> </igRibbon:XamRibbon.ApplicationMenu>
</igRibbon:XamRibbon> </igRibbon:RibbonWindowContentHost.Ribbon> <ContentControl Content="{Binding MyContent}" ContentTemplateSelector="{StaticResource myContentTemplateSelector}" /> </igRibbon:RibbonWindowContentHost> </igRibbon:XamRibbonWindow>
The xaml where i have the Ribbon is like this. Then we add in the code behind the tabs (Ribbon.Tabs.Add(tab);) So we tried to add the code you sent me in the Resources secion of the Ribbon. But when we run the application it gets completly ignored.
Any suggestions you could make me will be greatly appreciated.
Thank you!