I managed to find a couple of really old posts on this, but nothing current. Is there a way to bind the recent items to a collection of some sort? I would think this would be the most common use of this kind of list, and I'm certainly not crazy about the idea of having to write code to do it.
Thanks!
Brad.
Hello,
I need to solve the same problem using XamRibbon. The provided solution do not provide the same style which items will use that are manual added to the RecentItems.
The hover highlights the whole itemscontrol and not each single item in it.
I can´t believe that there is no "real" binding support for the RecentItems?
Can you please solve this issue or provide any workaround for it?
Hello Bradley,
I am just checking your progress on the issue that you are having.
If you require any further assistance please do not hesitate to ask
Thank you for your post.
I have been looking into it, but it seems like I am missing something from your scenario. Would you please provide me with a screenshot of the functionality you want to display. If you want to change the style for background of the RecentItems panel you can create style for ToolenuItem and handle its Loaded Event by EventSetter:
<Style TargetType="{x:Type igRibbon:ToolMenuItem}">
<EventSetter Event="Loaded" Handler="t_Loaded"/>
</Style>
In the event handler you can access the Border which contains your ItemsControl by using GetDescendantFromName method of our Utilities class. Once you got the Border you can access its parent and child visual elements by using Utilities class. I modified short sample application to show you how you can implement this approach. Please let me know if I am missing something from your scenario.
If you require any further assistance on the matter, please do not hesitate to ask.
This might work, but then I'd want to be able to tweak the style of the "ApplicationMenu.RecentItems" to remove the "selected" style. I haven't found a way to do that yet.
I have been looking into your requirements. The RecentItems property is read only and it seems that currently if you want to bind its content to some collection you can provide some kind of ItemsControl like a ListBox and then bind it to the
Collection you want. You can take a look at the following link for more details about RecentItems property:
http://help.infragistics.com/doc/WPF/2015.1/CLR4.0/?page=InfragisticsWPF4.Ribbon.v15.1~Infragistics.Windows.Ribbon.ApplicationMenu~RecentItems.html
I have created short sample application based on your scenario in order to show you how you can implement the functionality you are looking for.
Please let me know if you require any further assistance on the matter.