public BrowserSubSpaceViewModel() { Title = "Browser"; BrowserTabs = new ObservableCollection <BrowserTabViewModel>(); Commands.Add(new NamedDelegateCommand("Browser.File.New", (f) => ExecuteCommandCommand.Execute("New"), f => ExecuteCommandCommand.CanExecute("New"))); Commands.Add(new NamedDelegateCommand("Browser.File.Close", (f) => ExecuteCommandCommand.Execute("Close"), f => SelectedTab != null && ExecuteCommandCommand.CanExecute("Close"))); Commands.Add(new NamedDelegateCommand("Browser.File.Zoom In", (f) => ExecuteCommandCommand.Execute("ZoomIn"), f => SelectedTab != null && ExecuteCommandCommand.CanExecute("ZoomIn"))); Commands.Add(new NamedDelegateCommand("Browser.File.Zoom Out", (f) => ExecuteCommandCommand.Execute("ZoomOut"), f => SelectedTab != null && ExecuteCommandCommand.CanExecute("ZoomOut"))); Commands.Add(new NamedDelegateCommand("Browser.File.Zoom Reset", (f) => ExecuteCommandCommand.Execute("ZoomReset"), f => SelectedTab != null && ExecuteCommandCommand.CanExecute("ZoomReset"))); Commands.Add(new NamedDelegateCommand("Browser.View.Toggle Sidebar", (f) => ExecuteCommandCommand.Execute("ToggleSidebar"), f => SelectedTab != null && ExecuteCommandCommand.CanExecute("ToggleSidebar"))); Commands.Add(new NamedDelegateCommand("Browser.View.Downlods", (f) => ExecuteCommandCommand.Execute("ToggleDownloadInfo"), f => SelectedTab != null && ExecuteCommandCommand.CanExecute("ToggleDownloadInfo"))); }
public void RefreshCanexecute() { GenerateCommandCommand.RaiseCanExecuteChanged(); ExecuteCommandCommand.RaiseCanExecuteChanged(); SaveBATCommand.RaiseCanExecuteChanged(); }