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

studio XFE 5 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?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,388 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,885 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 68,656 Reputation points Microsoft Vendor
    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