Exemplo n.º 1
0
        public StandardWindowMenuBuilder AlwaysOnTop()
        {
            EnsureSeparatorExists();

            var alwaysOnTopMenuItem = _factory.CreateMenuItem("Always on &top");

            alwaysOnTopMenuItem.Clicked += delegate
            {
                var alwaysOnTop = !alwaysOnTopMenuItem.Checked;
                _form.TopMost = alwaysOnTop;
                alwaysOnTopMenuItem.Checked = alwaysOnTop;
                _menu.UpdateMenu(alwaysOnTopMenuItem);
            };
            _menu.InsertMenu(_pos++, alwaysOnTopMenuItem);

            return(this);
        }