private async Task Save(bool finalize) { Model.Save(); await App.Current.Dispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle, (Action)(async() => { Sidebar _sidebar = App.Current.Sidebar; if (_sidebar == null) { return; } await _sidebar.Reset(finalize); })); }
private void Save(bool finalize) { Model.Save(); Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle, (Action)(() => { Sidebar _sidebar = (Application.Current as App).GetSidebar; if (_sidebar == null) { return; } _sidebar.Reset(finalize); })); }