We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to make SFTreeNavigator to look OK in Dark Theme?

I am developing an app that should use the default Dark Theme.
I am using the latest v15.2.0.40.

However, when I switch to the Dark Theme ( in the Syncfusion Sample UWP.Navigation):


It looks awful:

How ca I make the SFTreeNavigation look good in Dark theme?


3 Replies

VR Vijayalakshmi Roopkumar Syncfusion Team July 3, 2017 12:46 PM UTC

Hi Magnus

Thank you for contacting Syncfusion Support.

Could you please let us know whether you want to set the Requested Theme in UWP Sample Browser application or SfTreeNavigator control? If you need to set the RequestedTheme in Sample Browser, at present there is no support for this requirement. But if you would like to apply RequestedTheme for SfTreeNavigator control, then it can be done. We have prepared the sample and source for your reference. 
Code Example: 
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> 
<navigation:SfTreeNavigator ItemsSource="{Binding Models}" Width="500"> 
<primitives:HierarchicalDataTemplate ItemsSource="{Binding Models}"> 
<TextBlock Text="{Binding Header}"/> 
Please check this sample and let us know if it helps you. Otherwise, if we have misunderstood your query kindly guide us with necessary details.

Vijayalakshmi V.R.  

MJ Magnus Johansson July 3, 2017 08:05 PM UTC



The problem I have now is when switching themes dynamically.

The concept is from the Microsoft Template Studio , where one can easily switch between the Dark and Light theme on the fly.

I have tried to make the SfTreeNavigator to adhere to that, but to no avail.

Attached is a simple sample, a SfTreeNavigator is placed on the BlankPage.xaml (the very same as in the sample you provided).

In the BlankPage.xaml.cs, I subscribe to the  ThemeSelectorService.OnThemeChanged event:

   private void ThemeSelectorService_OnThemeChanged(object sender, Windows.UI.Xaml.ElementTheme e)


            treeNavigator.RequestedTheme = e;


But it doesn't switch the theme.

Any ideas?



Attachment: TreeNavigatorThemeTest_35866550.zip

VR Vijayalakshmi Roopkumar Syncfusion Team July 7, 2017 11:54 AM UTC

Hi Magnus

Thank you for the patience.

At present, SfTreeNavigator does not support the reported requirement. A support incident to track the status of this has been created under your account. Please log on to our support website to check for further updates.


Please let me know if you have any questions.

Vijayalakshmi V.R. 

Live Chat Icon For mobile
Up arrow icon