/// <summary> /// Adds a new <see cref="AboutMenuItem"/> to the list. /// </summary> /// <param name="click">The action invoked when the item is clicked.</param> public void AddAboutItem(Action <IntPtr> click = null) { AboutMenuItem item = new AboutMenuItem(LibuiLibrary.uiMenuAppendAboutItem(Handle.DangerousGetHandle())); if (click != null) { item.Clicked += (sender, args) => { if (args != null) { click(args.Data); } }; } Items.Add(item); }
/// <summary> /// Adds a new <see cref="AboutMenuItem"/> to the list. /// </summary> /// <param name="click">The action invoked when the item is clicked.</param> public void AddAboutItem(Action <IntPtr> click = null) { AboutMenuItem item = new AboutMenuItem(Libui.uiMenuAppendAboutItem(this)); if (click != null) { item.Clicked += (sender, args) => { if (args != null) { click(args.Data); } }; } Items.Add(item); }