Hi - I read about getting a combo box inside a ribbon bar and that it is possible. However, the topic was a bit outdated.
Can you provide me with sample code for the best way of doing this in version 10.3.
Thanks,
The information in the forum thread <https://es.infragistics.com/community/forums/f/retired-products-and-controls/39619/dropdown-and-or-textbox/226863#226863> should still be relevant, though it needs just a few tweaks to namespaces and control names.
However, I have attached a sample that uses 10.3 and makes these fixes. I also turned the ItemsSource in to a DependencyProperty so it can be bound to data and exposed the DisplayMemberPath property as well.
Please let me know if you have any further questions or concerns about this matter.
Hi,
I am new to Infragistics. The code give in this thread works well if we want to include ComboBox but what if we want to include XamComboEditor control in Ribbon group? Any help would be greatly appreciated. When I try to do the same like how you implemented for ComboBox I get error
Failed to create a 'System.Type' from the text 'local:XamComboEditorToolControl'. I think its because GetTemplateChild is inherited by the System.Widnows.Controls and the xamcomboeditor control is not from that.
Thanks
thank you for this example. But how can I bind the selected item or create a click event or click command? How can I inform the mvvm class, when an item is selected in the combobox?
Is a combobox tool in the next version 11.2? I miss many features in your ribbon control.
Regards
Marco
Hi Marco,
You can use the approach from the samples above and modify the custom tool to fit your needs.
Attached is a modified sample that epoxes a SelectedItem property and SelectionChanged event. You can use it as a base and make any other modifications you might need.
Hope this helps,
Hi Georgi,
thank you for the sample. But I must fill the combo from code behind. I can not use xaml to bind the combo to a property. I have modified the sample and it works. But I must save the new instance from the XamComboEditorToolControl in a list, because the function "ResolveToolControl" was called twice. Can you take a quick look over my sample, if this is the right way?
Hi there!
I was able to get the combobox added and working in ribbon using the code you provided, but I wanted to use a slider control inside Xamribbon. I tried to follow the same steps as you did for combo box, but slider doesn't show up on the ribbon. I am not sure if I was able to get the apply template thing working correctly for it.
Would appreciate a lot if you could guide me out here or provide some code snippet to have slider control added in XamRibbon.
-Vikram
Hi again Vikram,
I just wanted to check back with you to find out if the sample I posted was useful for your needs. If you have any questions, please let me know.