avalonia-docs icon indicating copy to clipboard operation
avalonia-docs copied to clipboard

Update docs for NativeMenu + NativeMenuBar

Open ewrogers opened this issue 2 years ago • 3 comments

I am new to Avalonia, but quite experienced with WPF and develop using Rider on macOS.

While developing my UI, I wanted to support the native menu bar at the top of the screen. Going through the documentation, I could not find anything about this. Looking in the Controls section I found NativeMenu but it is not clear how it works.

Then I found an older Github issue that mentions NativeMenuBar but that's not in the docs. Ultimately, I searched the entire repo for this and found an integration test example that uses it in XAML.

Using that I got it to work, but it shows Avalonia Application as in the macOS menu bar instead of my window title. Still not sure how/where to change that.

It would be really nice to update the docs with how to use NativeMenuBar and NativeMenu for cross-platform UIs.

ewrogers avatar Apr 20 '23 06:04 ewrogers

@ewrogers transferred this into the Docs Repo. It's a good content request 👍

We will update the docs for 11.0 first, but it's noted at least.

timunie avatar Apr 20 '23 07:04 timunie

Has any work been done on this? I recently started using Avalonia and found the NativeMenuItem documentation horribly confusing. I just created a fork of avalonia-docs to add some working examples for macOS.

codergal6502 avatar May 02 '25 22:05 codergal6502

Please see https://github.com/codergal6502/avalonia-docs--native-menu-item/blob/main/docs/reference/controls/nativemenu.md if you're interested.

codergal6502 avatar May 02 '25 22:05 codergal6502