Show / Hide Table of Contents

Method WndSavedRect.Restore(+ 1 overload)


Overload

Calls WndSavedRect.FromString. If it returns true, calls WndSavedRect.NormalizeRect, ExtWpf.SetRect, maximizes if need and returns true. Call this function before showing window.

public static bool Restore(Window w, string saved, Action<string> save = null)
Parameters
w  (Window)
saved  (string)

String created by WndSavedRect.ToString.

save  (Action<string>)

If not null, called when closing the window. Receives string for saving. Can save it in registry, file, anywhere.

Returns
bool
Exceptions
InvalidOperationException

Window is loaded.


Overload(top)

Calls WndSavedRect.FromString. If it returns true, sets form bounds = WndSavedRect.NormalizeRect, maximizes if need, sets StartPosition = Manual, and returns true. Call this function before showing window.

public static bool Restore(Form form, string saved, Action<string> save = null)
Parameters
form  (Form)
saved  (string)

String created by WndSavedRect.ToString.

save  (Action<string>)

If not null, called when closing the window. Receives string for saving. Can save it in registry, file, anywhere.

Returns
bool