3

I am creating a uwp app and when i set my xaml code to this

<Controls:HamburgerMenu x:Name="MyHamburgerMenu"  HamburgerBackground="#FFD13438"
                HamburgerForeground="White"
                NavAreaBackground="# FF2B2B2B"
                NavButtonBackground="#FFD13438"
                SecondarySeparator="White"
                NavButtonForeground="White" 
                LostFocus="MyHamburgerMenu_LostFocus"
                  DisplayMode="CompactOverlay"


                        >

Its not changing the color of the Hamburger Panel I have tried all colors.Its still shows the default colors only. Also even when i change the display mode it still pushes the Title Page. I dont whats causing the issue.My Template 10 version is v1.1.10.

The issue

Uwpbeginner
  • 405
  • 4
  • 15
  • What is this HamburgerMenu control? Did you make it yourself? – Glen Thomas Apr 23 '16 at 19:26
  • No its a control already in template 10 and in documentation of that its said that you can change the color just like i typed. @GlenThomas https://github.com/Windows-XAML/Template10/wiki/Docs-%7C-Controls#hamburgermenu – Uwpbeginner Apr 23 '16 at 23:53
  • I got it to work using OPs code (without space after #). My issue was that the style.xaml was not being seen. But after I removed AccentColor in TargetType="controls:HamburgerMenu the other colors came through. It appears that AccentColor was overriding. – ezaspi Jun 15 '16 at 18:31

2 Answers2

1

To set the background color of the hamburger panel, you have to use the NavAreaBackground dependency property as you did. It should work fine. The problem is the space character between '#' and the hexadecimal value 'FF2B2B2B' in your code. Just remove the space character and it will work : NavAreaBackground="#FF2B2B2B"

ndelabarre
  • 269
  • 1
  • 4
  • I have done that and its still not working i think its because of the issue of #860 the template 10 . https://github.com/Windows-XAML/Template10/issues/860 – Uwpbeginner Apr 26 '16 at 07:46
  • Definitely the hamburger panel color could not be set properly with the space character inserted as you did in your original code "# FF2B2B2B". If the problem still persists, then the root cause might not come from the basic xaml code you provide. I suggest you to post the full detail of the xaml page. Did you define elsewhere some custom style for the HamburgerMenu control ? Furthermore I don't understand why you suspect the issue #860 which relates to behavior interactivity SDK assembly reference. – ndelabarre Apr 26 '16 at 09:46
1

In your Shell.xaml.cs file just comment this line HamburgerMenu.RefreshStyles(_settings.AppTheme, true);

It should work.

tushargoyal1309
  • 175
  • 1
  • 14