WindowState 1.2.0
dotnet add package WindowState --version 1.2.0
NuGet\Install-Package WindowState -Version 1.2.0
<PackageReference Include="WindowState" Version="1.2.0" />
paket add WindowState --version 1.2.0
#r "nuget: WindowState, 1.2.0"
// Install WindowState as a Cake Addin #addin nuget:?package=WindowState&version=1.2.0 // Install WindowState as a Cake Tool #tool nuget:?package=WindowState&version=1.2.0
WindowState
Library to help save window state of WinForms windows. It will store Size
, Location
, FormWindowState
(Normal, Minimized, Maximized), ColumnHeader.Width
and SplitContainer.Distance
. WindowStates
can be put directly into settings.
Usage
Initialization
Anyway, initialize a WindowStates
object somewhere. Can be put directly into Properties.Settings.Default
, it will serialize automatically:
var settings = Properties.Settings.Default;
// Initialize WindowStates collection if null
if (settings.WindowStates == null)
{
settings.WindowStates = new WindowStates();
}
Load
Use the WindowStates.Load(Form, throwErrorIfNotFound, restoreColumns = true, restoreSplitContainers = true)
function:
settings.WindowStates.Restore(this, false);
Save
Use the WindowStates.Save(Form, saveColumns = true, saveSplitContainers = true)
function:
settings.WindowStates.Save(this);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Add Save and Restore functions to WindowStates for easier access