Extension methods for saving and restoring the position of a WPF Window using JSON strings.
publicstaticstringGetWindowPositionString(Windoww)Gets the window position as a JSON string.
Windoww - The Window
String The window position as a JSON string.
publicstaticvoidRestoreWindowPosition(Windoww,stringwpStr)Restores the window position from a JSON string.
Windoww - The Window
wpStrString JSON string
publicstaticvoidEnsureIsVisible(Windoww)Ensure a window is visible on the screen. If it is partially hidden, snap it on screen.
Windoww - The Window