Skip to content

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
Discussion options

You must be logged in to vote

The easiest way to do this would be to set the Name property in the App.axaml. Something like this would do it:

<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 App.axaml

<NativeMenu.Menu>
     <NativeMenu>
         <NativeMenuItem Header="About My App Name" />
         <NativeMenuItem Header="C…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@luluxiaoyu
Comment options

Answer selected by luluxiaoyu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants