SpicyCat.Winforms.Extensions
1.0.5
dotnet add package SpicyCat.Winforms.Extensions --version 1.0.5
NuGet\Install-Package SpicyCat.Winforms.Extensions -Version 1.0.5
<PackageReference Include="SpicyCat.Winforms.Extensions" Version="1.0.5" />
<PackageVersion Include="SpicyCat.Winforms.Extensions" Version="1.0.5" />
<PackageReference Include="SpicyCat.Winforms.Extensions" />
paket add SpicyCat.Winforms.Extensions --version 1.0.5
#r "nuget: SpicyCat.Winforms.Extensions, 1.0.5"
#:package SpicyCat.Winforms.Extensions@1.0.5
#addin nuget:?package=SpicyCat.Winforms.Extensions&version=1.0.5
#tool nuget:?package=SpicyCat.Winforms.Extensions&version=1.0.5
SpicyCatGames.Winforms.Extensions lets you easily add transitions to your Windows Forms applications.
To transition to a new form:
this.LoadForm(new OtherForm());
And to transition back to previous form:
this.CloseAndGoBack();
SpicyCatGames.Winforms.Extensions.FormExtensions Documentation
The FormExtensions
class provides extension methods for transitioning between forms in a Windows Forms application. Below are the details on how to use each of the methods available in this class.
Methods
LoadForm
public static void LoadForm(this Form currentForm, Form newForm, bool setText = true)
Description
Transitions from the current form to a new form.
Parameters
currentForm
(Form): The form that is currently being shown.newForm
(Form): The form to transition into.setText
(bool, optional): Whether or not to append the ClickOnce version number to the form text. Default istrue
.
Usage
this.LoadForm(new OtherForm());
This will hide the currentForm
, show the newForm
, and optionally append the version number to the newForm
's text.
CloseAndGoBack
public static void CloseAndGoBack(this Form currentForm)
Description
Closes the current form and transitions back to the previous form.
Parameters
currentForm
(Form): The form that is currently being shown.
Usage
this.CloseAndGoBack();
This will close the currentForm
and show the last form that was shown before the currentForm
.
GoBack
public static void GoBack()
Description
Shows the previous form without closing the current form, allowing you to choose to close it manually.
Usage
FormExtensions.GoBack();
This will show the last form that was shown before the current form without closing the current form.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net10.0-windows was computed. |
-
net8.0-windows7.0
- 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.