private void MainModel_OnLyricsFocusChanged(LyricLineGroupModel item) { this.Dispatcher.BeginInvoke(new Action(() => { this.ctlLyric.ItemsSource = item.Where(e => !string.IsNullOrWhiteSpace(e.Line.Text)).ToArray(); })); }
private void LyricViewerModel_LyricsFocusChanged(LyricLineGroupModel item) { if (Config.Instance.MainWindow_AutoScroll == false) { return; } try { this.Dispatcher.BeginInvoke(new Action <object>(this.ctlItemsControl.ScrollToCenterOfView), item); } catch { } }