why maui can not set status bar transparent?

mc 5,426 Reputation points
2023-05-10T03:14:19.28+00:00

in android please check this:

https://stackoverflow.com/questions/22192291/how-to-change-the-status-bar-color-in-android/24997241#24997241

but I set this to #00000000 but the color is still not changed. not alpha = 0

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

1 answer

Sort by: Most helpful
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 50,126 Reputation points Microsoft External Staff
    2023-05-16T02:44:18.12+00:00

    Hello,

    According to the official Android documentation Android system bars, setting StatusBar to transparent in Android requires the use of edge-to-edge features.

    Transparent bars using the edge-to-edge feature, ideal for letting your content shine through using the most screen space.

    Therefore, you could refer to Display content edge-to-edge in your app for more details on how to implement this feature in Maui.

    If your need is to change the color of the StatusBar to be the same as the top of the page, it is recommended that you use CommunityToolkit to manually modify the color of the StatusBar.

    Please refer to StatusBarBehavior for more details.

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    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.