private async void AddLog(string log)
        {
            _logs.Add(log);
            await Task.Yield(); // wait for layout updated.

            LogsScrollViewer.ChangeView(null, LogsScrollViewer.ScrollableHeight, null);
        }
        private async void AddLog(string message)
        {
            Logs.Add(message);
            if (ScrollLogsBtn.IsChecked.HasValue && ScrollLogsBtn.IsChecked.Value)
            {
                await Task.Delay(100);

                LogsScrollViewer.ChangeView(0, LogsScrollViewer.ScrollableHeight, null);
            }
        }
Exemplo n.º 3
0
 void comparer_OnLogMessage(object sender, string e)
 {
     LBLLog.Content += e + "\n";
     LogsScrollViewer.ScrollToBottom();
 }