Пример #1
0
        public override ContextMenuStrip GetContextMenu(ItemContextMenuRequestEventArgs requestEventArgs)
        {
            var menu = new ContextMenuStrip();

            menu.Items.Add(new ToolStripMenuItem("Copy to Clipboard", null, (s, e) => ClipboardEx.SetTextSafe(DataContext.Message)));
            Utility.MarkDropDownForAutoDispose(menu);
            return(menu);
        }
Пример #2
0
 /// <summary>Gets the context menu.</summary>
 ///	<param name="requestEventArgs">Request parameters.</param>
 /// <returns>Context menu for specified location.</returns>
 public virtual ContextMenuStrip GetContextMenu(ItemContextMenuRequestEventArgs requestEventArgs)
 {
     if (requestEventArgs == null)
     {
         return(null);
     }
     ContextMenuRequested?.Invoke(this, requestEventArgs);
     return(requestEventArgs.ContextMenu);
 }