[MAUI] How to set the icon of a new window in MAUI? Including Android and Windows platforms

studio XFE 95 Reputation points
2024-04-18T01:43:45.9833333+00:00

I need to open a new window on my Android device and set its icon, similar to a WeChat mini program, but I haven't seen any API documentation related to it in the official documentation that allows me to set its icon, so I want to ask if this is possible and how do I need to do it?

Developer technologies | .NET | .NET MAUI
Developer technologies | .NET | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-04-25T09:01:33.38+00:00

    You cannot change the application icon at the runtime. For native android side, you can change the icon with two Activities, but you have to restart your application then icon will be changed.

    For MAUI side. Window do not have properties or methods to change it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.