NavigationBar.TitleView does not hide menu icon in UWP. RRS feed

  • Question

  • User394095 posted

    This is my NavBar title view:

            <StackLayout Margin="0" Padding="6,0,6,0" BackgroundColor="Yellow"
                <Button VerticalOptions="Center" ImageSource="backArrow_icon.png"
                        HeightRequest="30" MinimumHeightRequest="30"
                        WidthRequest="30" MinimumWidthRequest="30"/>
                <Label VerticalOptions="Center"
                       Text="{x:Static resources:AppResources.Share}"/>
                <Button VerticalOptions="Center" ImageSource="Check_Icon.png"
                        HeightRequest="30" MinimumHeightRequest="30"
                        WidthRequest="30" MinimumWidthRequest="30"/>

    How do I make the menu icon marked in red, invisible? or get rid of it?

    Thursday, May 21, 2020 8:43 AM

All replies

  • User371688 posted

    NavigationBar.TitleView does not hide menu icon in UWP.

    Hi, Goutham_HasProblems , is your app is a materdetail app? If yes, then you could replace hamburg icon easily. Because in UWP platform, it was render with the button with PaneButton style, And you could find it here. Just copy it to UWP App.xaml file and replace the content property like the following.

            <Style x:Key="PaneButton" TargetType="Button">
                <Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
                <Setter Property="FontSize" Value="20" />
                <Setter Property="Height" Value="48" />
                <Setter Property="Width" Value="48" />
                <Setter Property="Content" Value="&#xE701;" />
    Friday, May 22, 2020 6:43 AM
  • User394095 posted

    Hey @jezh , thanks for responding. I actually don't want the menu icon to be completely removed from my app, just in certain pages. I know of the style you have mentioned, and I have used it to customise some hover actions. I am fairly new to the whole UWP development scene, and I believe my very approach in implementing the NavBar the way I wanted is wrong. In a mobile application, the user can always swipe and get the MasterPage displayed, which is clearly not possible in an UWP application. Yet, the user must know about the existence of a Master page for navigation no matter where they are present in the app, and hence the need for the menu icon to be displayed as an umbrella for the user's access.

    Friday, May 22, 2020 4:43 PM
  • User371688 posted

    Yes, it is the case just as you said , for the Master page, the menu icon is the necessary user's access for this type of app. Therefore, we do not recommend you to remove or hide this menu icon.

    Thanks for you support for xamarin.

    Best Regards!

    Tuesday, May 26, 2020 8:30 AM
  • User371688 posted

    Hi @Goutham_HasProblems ,could you please mark this thread to finish this topic? Thanks in advance. :)

    Wednesday, May 27, 2020 8:20 AM
  • User394095 posted

    Hey @jezh , It may look like our understanding of how the Menu icon for MasterDetailPage should behave with respect to the whole application is right. But, there might be a possibility to actually hide the menu icon, and since that is what is the question is essentially asking, I am gonna leave it open. So, that if someone who actually wants the menu icon to go away may hopefully find that answer here.

    Friday, June 5, 2020 7:39 AM