private void LogRtbClear() { if (LogRtb.CheckAccess()) { LogRtb.Document.Blocks.Clear(); } else { Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() => LogRtb.Document.Blocks.Clear())); } }
private void LogRtbAppendText(String someText) { if (LogRtb.CheckAccess()) { LogRtb.AppendText(someText); LogRtb.ScrollToEnd(); } else { Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() => { LogRtb.AppendText(someText); LogRtb.ScrollToEnd(); })); } }