Customising context menu in recent documents control

Bars for WPF Forum

The latest build of this product (v25.1.4) was released 2 months ago, which was before this thread was created.
Posted 21 days ago by Jason Trenouth
Version: 25.1.4
Avatar

Hi,

Another question about the recent documents control from our migration from Ribbon to Bars.

See previous question: https://www.actiprosoftware.com/community/thread/26709/reducing-clutter-in-bars-recentdocumentcontro

New question:

Is there a way of customising the context menu on the control? We had a "Copy" (to clipboard) menu item that we would like to migrate.

By default it looks as if the small size form doesn't have a context menu so I can add one there, but the large size form of the control has "Open" and "Pin" menu items and my efforts to add a "Copy" item haven't worked so far.

Is there a way of doing that?

__Jason

Comments (2)

Answer - Posted 20 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Actually both sizes of the recent documents menu have the same context menu.  The only thing is that the one with Open/Pin options is only if it's in a Backstage or not.  It's not currently showing if in an application menu (like in our first example in the Recent Documents QuickStart), which is a bug we will fix for the next version.  The second example in that QuickStart, which is in a Backstage, shows the expected menu, even if you set UseLargeSize="False".

Before any context menu is displayed, the Ribbon.MenuOpening event will fire.  The expected menu will have an e.Kind == BarMenuKind.RecentDocumentItemContextMenu.  Per above, that kind is set properly when in Backstage but not app menus right now and we will fix that for the next version.


Actipro Software Support

Posted 14 days ago by Jason Trenouth
Avatar

Okay. Thanks. I'd found a workaround that took over the menu construction.

Add Comment

Please log in to a validated account to post comments.