Exemple #1
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                this.items.Clear();
                this.items = null;

                this.contextMenu = null;
            }

            base.Dispose(disposing);
        }
Exemple #2
0
            protected override void OnSelect(EventArgs e)
            {
                CommandBarContextMenu contextMenu = this.GetContextMenu() as CommandBarContextMenu;

                if (contextMenu == null)
                {
                    throw new NotSupportedException();
                }

                contextMenu.SelectedMenuItem = this;
                base.OnSelect(e);
            }