Example #1
0
            /// <summary>
            /// Adds a <see cref="AboutMenuItem"/> to the end of the <see cref="MenuItemCollection"/>.
            /// </summary>
            /// <param name="click">The action invoked when the child is clicked.</param>
            public void AddAbout(Action <IntPtr> click = null)
            {
                if (Owner.IsInvalid)
                {
                    throw new InvalidHandleException();
                }

                AboutMenuItem item = new AboutMenuItem(new SafeControlHandle(Libui.MenuAppendAboutItem(Owner.Handle)));

                if (click != null)
                {
                    item.Clicked += (data) =>
                    {
                        if (data != null)
                        {
                            click(data);
                        }
                    };
                }
                base.Add(item);
            }