/// <summary> /// Initializes a new instance of the <see cref="IAlgorithmMenuItemViewModel"/> class. /// </summary> /// <param name="graphProvider">The <see cref="IGraphProvider"/>.</param> /// <param name="messageHandler">The <see cref="IMessageHandler"/>.</param> /// <param name="parentViewModel">The parent view model.</param> /// <param name="algorithm">The <see cref="IGraphAlgorithm"/>.</param> public IAlgorithmMenuItemViewModel(IGraphProvider graphProvider, IMessageHandler messageHandler, MenuItemViewModel parentViewModel, IGraphAlgorithm algorithm) : base(parentViewModel) { this.graphProvider = graphProvider; this.messageHandler = messageHandler; this.Header = algorithm.Name; this.Command = new RelayCommand(param => this.Execute(algorithm)); }
/// <summary> /// Initializes a new instance of the <see cref="MenuItemViewModel"/> class. /// </summary> /// <param name="parentViewModel">The parent view model.</param> public MenuItemViewModel(MenuItemViewModel parentViewModel) { this.ParentViewModel = parentViewModel; this.childMenuItems = new ObservableCollection <MenuItemViewModel>(); }