/// <summary> /// Restore only position /// </summary> /// <param name="window"></param> /// <param name="key"></param> public void RestorePosition(Window window, string key) { if (this.windowPlaces.TryGetValue(key, out var place)) { WindowRelocate.Relocate(new WindowInteropHelper(window).Handle, place.Left, place.Top); } }
/// <summary> /// Store size and position /// </summary> /// <param name="window"></param> /// <param name="key"></param> public void Store(Window window, string key) { this.windowPlaces[key] = WindowRelocate.GetPlace(new WindowInteropHelper(window).Handle); }