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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SpicyCat.Winforms.Extensions" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SpicyCat.Winforms.Extensions" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="SpicyCat.Winforms.Extensions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SpicyCat.Winforms.Extensions --version 1.0.5
                    
#r "nuget: SpicyCat.Winforms.Extensions, 1.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SpicyCat.Winforms.Extensions@1.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SpicyCat.Winforms.Extensions&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=SpicyCat.Winforms.Extensions&version=1.0.5
                    
Install as a Cake Tool

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 is true.
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 Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.

Version Downloads Last Updated
1.0.5 228 5/13/2025
1.0.4 298 6/30/2024