CDS.WinFormsMenus 1.0.1

dotnet add package CDS.WinFormsMenus --version 1.0.1
                    
NuGet\Install-Package CDS.WinFormsMenus -Version 1.0.1
                    
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="CDS.WinFormsMenus" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CDS.WinFormsMenus" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="CDS.WinFormsMenus" />
                    
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 CDS.WinFormsMenus --version 1.0.1
                    
#r "nuget: CDS.WinFormsMenus, 1.0.1"
                    
#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.
#addin nuget:?package=CDS.WinFormsMenus&version=1.0.1
                    
Install CDS.WinFormsMenus as a Cake Addin
#tool nuget:?package=CDS.WinFormsMenus&version=1.0.1
                    
Install CDS.WinFormsMenus as a Cake Tool

CDS.WinFormsMenus

CDS.WinFormsMenus is a library for creating very simple and quick tree-view based menus on WinForms apps. It is great for simple demo and test applications, where a conventional menu doesn't quite fit the pattern.

It's available for .Net 8 and .Net Framework 4.8 applications.

It will only save you a few minutes of coding, but that leaves more time for the fun stuff!

Usage

The menu consists of groups and items. Each group can contain other groups and items. Each item has an action associated with it.

After referencing the library, add a CDS.WinFormsMenus.Basic.MenuTree control to your form.

You can this create the menu like this:

var formsGroup = menuTree.AddGroup("Forms", tooltip: "A group of items for showing colourful forms!");
formsGroup.AddDemo("Red form", "Opens a red form", this, () => new RedForm());
formsGroup.AddDemo("Blue form", "Opens a blue form", this, () => new BlueForm());

var actionsGroup = menuTree.AddGroup("Actions");
actionsGroup.AddDemo("Message box", "Shows a message box", this, ShowMessageBox);

menuTree.ExpandAllGroups();

The user can then either double-click an item to run the action, or select it and hit the enter key.

Screenshot

Build Instructions

Follow the standard practice for building a .Net project using Nerdbank.GitVersioning. The version.json file is automatically updated with the new version number, or can be manually updated for a major or minor version change.

License

This project is licensed under the MIT License.

Attributions

Hierarchy icon created by Freepik - Flaticon.

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed. 
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.8

    • No dependencies.
  • 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.1 111 3/21/2025