CDS.WinFormsMenus 1.1.3

dotnet add package CDS.WinFormsMenus --version 1.1.3
                    
NuGet\Install-Package CDS.WinFormsMenus -Version 1.1.3
                    
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.1.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CDS.WinFormsMenus" Version="1.1.3" />
                    
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.1.3
                    
#r "nuget: CDS.WinFormsMenus, 1.1.3"
                    
#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 CDS.WinFormsMenus@1.1.3
                    
#: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=CDS.WinFormsMenus&version=1.1.3
                    
Install as a Cake Addin
#tool nuget:?package=CDS.WinFormsMenus&version=1.1.3
                    
Install 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, .Net 10 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 api = menuTree.API;

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

var actionsGroup = api.AddGroup("Actions");
actionsGroup.AddItem("Message box", "Shows a message box", ShowMessageBox);

api.ExpandAllGroups();

Using menuTree.API is recommended — it exposes only the library's own methods and properties, keeping IntelliSense focused and uncluttered by the underlying UserControl surface.

By default, items are activated by double-clicking or pressing Enter. You can change this to single-click by setting the MouseActivation property:

menuTree.API.MouseActivation = MouseActivation.SingleClick;

The available values are SingleClick and DoubleClick. The Enter key always activates the selected item regardless of this setting.

Screenshot

Build Instructions

Follow the standard practice for building a .Net project using MinVer. Versions are derived automatically from Git tags (e.g. v1.2.0). To publish a new release, create and push a tag: git tag v1.2.0 && git push --tags. Between tags, MinVer appends a pre-release suffix automatically (e.g. 1.2.0-alpha.0.3).

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.  net10.0-windows was computed.  net10.0-windows7.0 is compatible. 
.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.
  • net10.0-windows7.0

    • 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.1.3 93 2/23/2026
1.1.1 80 2/23/2026
1.0.1 211 3/21/2025