private void InitializeSaveSettingsOnMove(Window window) { const int OneSecond = 1000; var saveSettings = DebounceService.Debounce <Window>(w => SaveSettings(w), OneSecond); window.SizeChanged += delegate { saveSettings(window); }; window.LocationChanged += delegate { saveSettings(window); }; }
private void SaveSettingsOnMove(Window window) { const int OneSecond = 1000; var saveSettings = DebounceService.Debounce <Window>(w => SaveSettings(w), OneSecond); window.SizeChanged += (_, __) => saveSettings(window); window.LocationChanged += (_, __) => saveSettings(window); }