public void Refill(IEnumerable <ScreenAction> actions) { ContextMenu.Items.Clear(); actions.Each(x => { var item = CommandMenuItem.Build(x); ContextMenu.Items.Add(item); }); }
public void Refill(IEnumerable<ScreenAction> actions) { ContextMenu.Items.Clear(); actions.Each(x => { var item = new CommandMenuItem(x); ContextMenu.Items.Add(item); }); }
public void SetUp() { command = MockRepository.GenerateMock<ICommand>(); command.Expect(x => x.CanExecute(null)).Return(true).IgnoreArguments(); screenAction = new ScreenAction { Binding = new InputBinding(command, new KeyGesture(Key.F3)), Name = "some text" }; item = new CommandMenuItem(screenAction); }