-1

I'm using a NavViewEx control of Template10.Extras.16299 in a UWP app, but with this i need to hide built in back button of NavViewEx control, because i already visible the AppViewBackButtonVisibility property, Now i have two back button in my application.

i.e.

enter image description here

Template10.Extras.16299 source: https://github.com/Windows-XAML/Template10/blob/master/Source/Template10.Extras.16299/Controls/NavViewEx.cs

Thanks.

Kalamarico
  • 5,466
  • 22
  • 53
  • 70
Avnish kumar
  • 68
  • 1
  • 7
  • if this or any answer has solved your question please consider [accepting it](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work) by clicking the check-mark. This indicates to the wider community that you've found a solution and gives some reputation to both the answerer and yourself. – CoCaIceDew Dec 20 '18 at 01:57

1 Answers1

2

hide built in back button of NavViewEx control

For hiding NavViewEx back button, you could modify the source code at line 138

_backButton = new Button
{
    Name = "BackButton",
    Content = new SymbolIcon
    {
        Symbol = Symbol.Back,
        IsHitTestVisible = false
    },
    Style = Resources["PaneToggleButtonStyle"] as Style,
    Visibility = Visibility.Collapsed,
};

You could also get BackButton with name by using visual tree helper then set Visibility as collapsed in NavViewEx loaded event.

Nico Zhu
  • 32,367
  • 2
  • 15
  • 36
  • `IsBackButtonVisible` is part of `NavigationView` and they are creating an explicit button via code behind, so even setting `IsBackButtonVisible` will not make any difference. Updating the source code itself should work as you suggested. – Dishant Dec 19 '18 at 04:16
  • Sure,I will modify the reply. – Nico Zhu Dec 19 '18 at 04:33