Win32Menu 1.0.0
See the version list below for details.
dotnet add package Win32Menu --version 1.0.0
NuGet\Install-Package Win32Menu -Version 1.0.0
<PackageReference Include="Win32Menu" Version="1.0.0" />
<PackageVersion Include="Win32Menu" Version="1.0.0" />
<PackageReference Include="Win32Menu" />
paket add Win32Menu --version 1.0.0
#r "nuget: Win32Menu, 1.0.0"
#:package Win32Menu@1.0.0
#addin nuget:?package=Win32Menu&version=1.0.0
#tool nuget:?package=Win32Menu&version=1.0.0
Win32Menu
English | 简体中文
Introduction
Highly encapsulated Win32 native menu implementation
MIT LICENSE
Built with 『CsWin32』
Shared publicly - feel free to try it!
By AuthorZiXi ❤️
How to Use
- Reference the Win32Menu project or download via NuGet (will be uploaded soon)
- The core class
NativeMenu
is fully documented - check the comments - For detailed examples:
- Download the project or visit 『GitHub』
- Review two demos demonstrating usage in WinForms and WPF
- Prefer
Win32MenuWinFormsDemo
for more comprehensive menu styles
Limitations?
- Initially designed without support for popup menu methods
- Does not currently support menu icons
- Not recommended to interfere with menu class through external methods
Rant
Honestly, Win32 API feels anti-human by modern standards, especially in OOP languages.
It's bizarre how modifying submenu items requires parent menu intervention.
Developing this revealed odd behaviors in GetMenuItemInfo
/SetMenuItemInfo
-
even when returning success, data was incorrect.
Ultimately resorted to ModifyMenu
for synchronization despite its limitations.
Motivation
The concept originated from:
- Observing menu implementations in some krkr games
- Dissatisfaction with default WinForms menu styling
- Partial implementations in abandoned project 『LeafFallEngine』
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0-windows7.0 is compatible. net10.0-windows was computed. |
-
net9.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.