Xamarin Forms top navigation bar for UWP

866 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 best solutions below

0
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,           
};