RibbonRecentItems - harborsiem/WinForms-Ribbon GitHub Wiki

RibbonRecentItems

In the markup file this control is called RecentItems

Public constructors, methods, properties and events:

Constructors:

Name Description
RibbonRecentItems(RibbonStrip, uint) Initializes a new instance of the RibbonRecentItems class.

Methods:

Name Description
Invalidate() Invalidates the RecentItems.
PutElement(RecentItemsPropertySet) Put a RecentItemsPropertySet to RecentItems to first position. Remove unpinned elements at the end of list if the list is full.

Properties:

Name Description
CommandId Get the Id; set by constructor.
CommandType Get the CommandType. Before this control is in view by the UI, the CommandType is Unknown. After this control is first time in UI view the CommandType is RecentItems.
Name Get, Set an optional Name.
Ribbon Get the RibbonStrip (set by constructor).
ResourceIds Get class MarkupResIds. This class delivers all markup resource ids for a Command. Only available if RibbonStrip.Markupheader is set.
Keytip Get, Set a Keytip string. See Note below.
Tag Get, Set an optional Tag.
RecentItems Get a List of RecentItemsPropertySet.
MaxCount Get maximum count of RecentItems, designed in Markup. Only available when ApplicationMenu is first time clicked.

Events:

Name Description
SelectedChanged User can handle the selected item. EventArgs are SelectedChangedEventArgs.
PinnedChanged User can handle the changed pinned items. EventArgs are PinnedChangedEventArgs.
CreateUICommand Control is created by the Ribbon Framework
DestroyUICommand Control is destroyed by the Ribbon Framework

!Note:
For properties Keytip, LableTitle, LabelDescription, TooltipTitle and TooltipDescription: If listed property value is only set by Markup resource you get a value of null (nothing). But if you set RibbonStrip property MarkupHeader to the 'Embedded Resource' RibbonMarkup.h file, you will get the correct string.