Customize "Avalonia Application" title in MacOS #9346
-
I've noticed that when running my project after Also there is an "About" submenu that opens this dialog: How can I change this and maybe replace with custom graphics? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
<NativeMenu.Menu>
<NativeMenu>
<NativeMenuItem Header="About My App" Command="{Binding AboutCommand}" />
</NativeMenu>
</NativeMenu.Menu> it will replace the default one. We probably need that in our default app template. |
Beta Was this translation helpful? Give feedback.
-
I've just found this issue after some googling and wanted to add some additional details. When you set For example: App.xaml <Application
...
Name="Test app">
</Application> Info.plist <plist version="1.0">
<dict>
....
<key>CFBundleName</key>
<string>Something else</string>
....
</dict>
</plist> build and publish the app to You could omit When you specify both The Apple Developer docs specify that
Whereas
So to reduce the amount of head-scratching and debugging for other people, my recommendation would be to:
Depending on the build configuration it seems like a smart idea to generate the contents of I'll create a PR on the Avalonia documentation site to make sure this appears there too. Note: I tried to actually call Note 2: This all of course doesn't show up when you launch the app from Rider or the output directory... |
Beta Was this translation helpful? Give feedback.
-
Referring to this comment: #3541 (comment) Where do you define the command since in this case the binding is happening in App.xaml? |
Beta Was this translation helpful? Give feedback.
-
Different possibility I think. If it was me I would have an AppViewModel which has a static instance and holds all of my Apps Commands. In the binding you can set that instance as source via x:static |
Beta Was this translation helpful? Give feedback.
-
@jeffdoolittle |
Beta Was this translation helpful? Give feedback.
-
Converted this into Q&A as this is neither a bug nor a feature request. If you disagree please let us know. |
Beta Was this translation helpful? Give feedback.
Name
property on theApplication
in yourApp.xaml
App.xaml
:it will replace the default one.
We probably need that in our default app template.