Пример #1
0
        public CommandMenuItem(Command command, StandardMenuItem parent)
        {
            _command = command;
            _parent  = parent;

            _listItems = new List <StandardMenuItem>();
        }
Пример #2
0
        public CommandMenuItem(Command command, StandardMenuItem parent)
        {
            _command = command;
            _parent = parent;

            _listItems = new List<StandardMenuItem>();
        }
Пример #3
0
        public CommandMenuItem(Command command, StandardMenuItem parent)
        {
            _command    = command;
            _keyGesture = IoC.Get <ICommandKeyGestureService>().GetPrimaryKeyGesture(_command.CommandDefinition);
            _parent     = parent;

            _listItems = new List <StandardMenuItem>();
        }
Пример #4
0
        public CommandMenuItem(Command command, StandardMenuItem parent)
        {
            _command = command;
            _keyGesture = IoC.Get<ICommandKeyGestureService>().GetPrimaryKeyGesture(_command.CommandDefinition);
            _parent = parent;

            _listItems = new List<StandardMenuItem>();
        }
Пример #5
0
        public CommandMenuItem(Command command, StandardMenuItem parent)
        {
            _command    = command;
            _keyGesture = IoC.Get <ICommandKeyGestureService>().GetPrimaryKeyGesture(_command.CommandDefinition);
            _parent     = parent;

            _listItems = new List <StandardMenuItem>();

            // MOD from pull request to original master https://github.com/tgjones/gemini/pull/134/files
            _command.PropertyChanged += (s, e) =>
            {
                if (e.PropertyName == "Visible" || e.PropertyName == "Checked")
                {
                    NotifyOfPropertyChange("Is" + e.PropertyName);
                }
                else if (e.PropertyName == "Text" || e.PropertyName == "IconSource")
                {
                    NotifyOfPropertyChange(e.PropertyName);
                }
            };
        }