private void Control_MouseClick(object sender, swf.MouseEventArgs e) { var menu = ContextMenuHandler.GetControl(Menu); if (menu != null && e.Button.HasFlag(swf.MouseButtons.Right)) { // TODO: Close tray menu when clicked outside // https://weblogs.asp.net/marianor/a-wpf-wrapper-around-windows-form-notifyicon menu.IsOpen = true; } }
public static NSMenu ToNS(this ContextMenu menu) => ContextMenuHandler.GetControl(menu);
public static Gtk.Menu ToGtk(this ContextMenu menu) => ContextMenuHandler.GetControl(menu);