how to use SystemUiFlags Enum


Hi! Well I know it might be a bit silly but I really can't figure out how to use SystemUiFlags.HideNavigation;
I want my app to hide system navigation bar when the app enters fullscreen but I just don't get how to use it correctly. Originally I used (StatusBarVisibility)View.SystemUiFlagHideNavigation; but since it became deprecated I'd like to renew the code a bit. Can you help me out a little bit?

there's an article with the modern enum for doing this but I don't understand how to use it.

A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,293 questions
0 comments No comments
{count} votes

Accepted answer
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 26,221 Reputation points Microsoft Vendor

    Welcome to our Microsoft Q&A platform!

    You can use SystemUiFlags like following code

    var uiOptions =  
                    SystemUiFlags.HideNavigation |  
                    SystemUiFlags.LayoutHideNavigation |  
                    SystemUiFlags.LayoutFullscreen |  
                    SystemUiFlags.Fullscreen |  
                    SystemUiFlags.LayoutStable |  
    Window.DecorView.SystemUiVisibility = (StatusBarVisibility)uiOptions;  

    I notice that systemUiVisibility is deprecated in Android R. You can use IWindowInsetsController.

     IWindowInsetsController insetsController = Window.InsetsController;  
     if (insetsController != null)  

    In addition, you can hide NavigationBar by Xamarin.Forms

    NavigationPage.SetHasNavigationBar(this, false);  

    For more information you can refer to :

    Best Regards,
    Wenyan Zhang

    If the response is helpful, please click "Accept Answer" and upvote it.
    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 additional answers

Sort by: Most helpful