I would like to associate a Keyword Shortcut to the ApplicationMenuItem like you can associate with a Button.
If we would do:
<igRibbon:ButtonTool Name="test" Caption="T_est" Command="{Binding MyCommand}"/>
That Button gets the "Alt+E" shortcut associated. By simply adding an Underscore to the Caption of the Button.
How can we accomplish the same with the ApplicationMenu2010Item, but when we do:
<igRibbon:ApplicationMenu2010Item Name="test" Header="T_est" Command="{Binding MyCommand}" ></igRibbon:ApplicationMenu2010Item>
The Application shows the text of the item with the underscore. Although It seems that it does assign the shortcut.
What is the correct way to achieve what we want?
Hello,
Thank you for your reply. Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir, MCPD
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support
Thanks a lot! When we update to that version I will test how it works.
The development issue with ID of 149177has been fixed and it is available in the latest Service Release. You can download the Service Release by logging in our web site and then going to Account\Keys and Downloads page.
Thank you for using Infragistics Components.
Krasimir, thanks a lot for the time you have taken into this issue.
About your comments:
The First Issue: Yes we realized why the item could be selected, but since this is a very common feature in many wpf applications. For example, is very common to have a Save button in the Backstage and in the Quick Access Bar. And I have never seen that you could still click a button in the backstage when it was disabled.
I dont quite understand how is that putting the Command in two places it fires only once, would you mind explaining me? I am sure I am not seeing something.
The Second Issue: I think this was no issue. We want the buttons to appear in the Quick Access Bar, so that is why I was showing you what we wanted to accomplish. Or is that I misunderstood something you said?
The third issue: I see, I mostly reported it because although you mentioned the KeyTip, the behavior still seemed buggy to me. Thanks for oppening the case!
So I just would like to understand why the Command fires only once, and if this is the only way to achieve what we want: To have a button both in the Quick Access bar and the Backstage.
Thanks in advance!
Thank you for your reply and the clarifications on the issues that you are having. Since the ApplicationMenu2010Items cannot be added to the QAT, you can use the approach that you are currently using. Regarding the issues that you are having:
<igWPF:ApplicationMenu2010Item
Command="{Binding TestCommand}" >
<igWPF:ApplicationMenu2010Item.Header>
<igWPF:ButtonTool
Name="appTest"
IsQatCommonTool="True"
Caption="T_est"
Command="{Binding TestCommand}"/>
</igWPF:ApplicationMenu2010Item.Header>
</igWPF:ApplicationMenu2010Item>
If you remove that property from the definition of the ButtonTool or set it to false, the “Test” will not appear in the QAT by default.
Regarding the third issue that you are having, the reason for the underscore to appear is that the ContentPresenter that is used in the ApplicationMenu2010Item does not have its RecognizesAccessKey property set to True. In order to hide the underscore, you can re-template the ApplicationMenu2010Item and set the
<ControlTemplate TargetType="igRibbon:ApplicationMenu2010Item"
x:Key="{x:Static igRibbon:ApplicationMenu2010Item.ButtonTemplateKey}">
………….
<ContentPresenter
Grid.Column="1"
ContentSource="Header"
RecognizesAccessKey="True"
igRibbon:XamRibbon.KeyTipPlacementType="Caption" />
</ControlTemplate>
I have modified the sample application that you have attached to implement the mentioned changes. Also I have logged the third behavior with our developers in our tracking system, with an issue ID of 149177. I have also created a support ticket on your behalf with number CAS-121695-J4S2L7in order to link the development issue to it so that you are automatically updated when a Service Release containing your fix is available for download.
Please let me know if you need any further assistance on the matter.
Krasimir
Developer Support Engineer