How can I modify the app name and content displayed in the menu bar on macOS? #17847
Answered
by
MikeCodesDotNET
luluxiaoyu
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
MikeCodesDotNET
Dec 30, 2024
Replies: 1 comment 1 reply
-
The easiest way to do this would be to set the <Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="macOSAppNameDemo.App"
Name="My App Name"
xmlns:local="using:macOSAppNameDemo"
RequestedThemeVariant="Default"> This results in the following: If you want to then customise the menu, you can use NativeMenu. The following is an example of this (place it inside the in the <NativeMenu.Menu>
<NativeMenu>
<NativeMenuItem Header="About My App Name" />
<NativeMenuItem Header="Check for Updates..." />
</NativeMenu>
</NativeMenu.Menu> |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
luluxiaoyu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The easiest way to do this would be to set the
Name
property in the App.axaml. Something like this would do it:This results in the following:
If you want to then customise the menu, you can use NativeMenu. The following is an example of this (place it inside the in the
App.axaml