Xamarin Forms top navigation bar for UWP

861 views Asked by At

I am developing a Xamarin forms app and I have used the NavigationPage.SetHasNavigationBar() to show/hide navigation bar. This works fine in Android and iOS but in UWP there is no navigation bar shown at the top.

Can someone explain why this happens.

Thanks in advance.

1

There are 1 answers

0
Nico Zhu On

NavigationBar also exists in xamarin.uwp,but in uwp you need to set the color and title of NavigationBar explicitly.

var nav = new NavigationPage(new MainPage()) {
    BarBackgroundColor = Color.Red,           
};