diff options
Diffstat (limited to 'Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml.cs')
| -rw-r--r-- | Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml.cs b/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml.cs index 9112f28f4..358cd7927 100644 --- a/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml.cs +++ b/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using System.Threading; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; @@ -29,5 +30,19 @@ namespace Tango.MachineEM.UI.Views { //txtResponse.ScrollToEnd(); } + + private void txtLog_TextChanged(object sender, TextChangedEventArgs e) + { + Task.Factory.StartNew(() => + { + Thread.Sleep(50); + + this.Dispatcher.Invoke(() => + { + txtLog.SelectionStart = txtLog.Text.Length; + txtLog.ScrollToEnd(); + }); + }); + } } } |
