How to change SfNavigationDrawer background?

I want to change SfNavigationDrawer background with it’s background property, but unsuccess, then, i try to switch the skin-theme, no effect, please help me.

3 Replies 1 reply marked as answer

SP Sakthivel Palaniyappan Syncfusion Team March 8, 2021 05:16 AM UTC

Hi Norkin,

Greetings from Syncfusion.

We have analyzed your query and we can achieve your requirement by setting Background color to navigation drawer content as like below code snippet.

XAML:
 
<syncfusion:SfNavigationDrawer x:Name="navigationDrawer" DrawerWidth="300"> 
    <syncfusion:SfNavigationDrawer.ContentView> 
        <Grid x:Name="mainContentView"  
                  Background="DarkBlue"> 
            <Grid.RowDefinitions> 
                <RowDefinition Height="auto"/> 
                <RowDefinition/> 
            </Grid.RowDefinitions> 
            <StackPanel   
                            Orientation="Horizontal"> 
                <Button x:Name="hamburgerButton" Content="Menu"  
                            Height="50" Width="50"  Foreground="White"  
                           Background="DarkBlue"  
                            HorizontalAlignment="Left"    
                            Click="HamburgerButton_Click"> 
 
                </Button> 
                <Label x:Name="headerLabel"   
                           Height="50"   
                           Content="Home" Foreground="White"  
                           Background="DarkBlue"/> 
            </StackPanel> 
            <Label Grid.Row="1"   
                       x:Name="contentLabel" HorizontalAlignment="Center" VerticalAlignment="Center"  
                       Content="Content View"   
                       Foreground="White"/> 
        </Grid> 
    </syncfusion:SfNavigationDrawer.ContentView> 
     
</syncfusion:SfNavigationDrawer>  
 
 

We have created sample based on this and please find the sample from below.

Sample:
https://www.syncfusion.com/downloads/support/directtrac/general/ze/NavigationDrawerWPF-1630450987.zip

Please let us know if you have any other queries.

Regards,
Sakthivel P.
 


Marked as answer

NO Norkin March 10, 2021 11:30 AM UTC

The problem has resolved depend on your message, thank for your help


SP Sakthivel Palaniyappan Syncfusion Team March 11, 2021 09:18 AM UTC

Hi Norkin,

Thanks for the update.

We are glad that the reported problem is resolved. Please let us know if you need any other assistance on this.

Regards,
Sakthivel P.
 


Loader.
Up arrow icon