private void InitialiseToolbar() { var autoscrollButton = new LogViewerToolbarButton( "Auto-Scroll", "Automatically scroll to show the newest entry", true, new DelegateCommand(e => autoscroll = !autoscroll)) { IsChecked = autoscroll, ImageIdentifier = "ScrollDown" }; var clearButton = new LogViewerToolbarButton( "Clear", "Clear the log messages from the display", false, new DelegateCommand(e => clearPending = true)) { ImageIdentifier = "Clear" }; var pauseButton = new LogViewerToolbarButton( "Pause", "Pause the addition of messages to the display", true, new DelegateCommand(PauseMessagesHandler)) { IsChecked = false, ImageIdentifier = "Pause" }; var toolbar = new ObservableCollection <ILogViewerToolbarButton> { autoscrollButton, clearButton, pauseButton }; ToolbarItems = toolbar; }
private void InitialiseToolbar() { var autoscrollButton = new LogViewerToolbarButton( "Auto-Scroll", "Automatically scroll to show the newest entry", true, new DelegateCommand(e => autoscroll = !autoscroll)); autoscrollButton.IsChecked = autoscroll; autoscrollButton.ImageIdentifier = "ScrollDown"; var clearButton = new LogViewerToolbarButton( "Clear", "Clear the log messages from the display", false, new DelegateCommand(e => clearPending = true)); clearButton.ImageIdentifier = "Clear"; var pauseButton = new LogViewerToolbarButton( "Pause", "Pause the addition of messages to the display", true, new DelegateCommand(PauseMessagesHandler)); pauseButton.IsChecked = false; pauseButton.ImageIdentifier = "Pause"; var toolbar = new ObservableCollection<ILogViewerToolbarButton> { autoscrollButton, clearButton, pauseButton }; ToolbarItems = toolbar; }