diff --git a/HuddledControls/ConsoleControl.cs b/HuddledControls/ConsoleControl.cs index f6f57e9..3f3c1a1 100644 --- a/HuddledControls/ConsoleControl.cs +++ b/HuddledControls/ConsoleControl.cs @@ -315,12 +315,10 @@ private void Write(ConsoleColor foreground, ConsoleColor background, string text { Dispatcher.BeginInvoke(DispatcherPriority.Render, (Action)delegate { - if (target == null) target = _current; - new Run(text, target.ContentEnd) { - Background = _brushes.BrushFromConsoleColor(background), - Foreground = _brushes.BrushFromConsoleColor(foreground) + Background = (this.BackgroundColor == background) ? this.Brushes.Transparent : this._brushes.BrushFromConsoleColor(background), + Foreground = this._brushes.BrushFromConsoleColor(foreground) }; ScrollViewer.ScrollToBottom(); });