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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to make SFTreeNavigator to look OK in Dark Theme?

Thread ID:





131270 Jul 2,2017 06:36 PM UTC Jul 7,2017 11:54 AM UTC UWP 3
Tags: SfTreeNavigator
Magnus Johansson
Asked On July 2, 2017 06:36 PM UTC

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?


Vijayalakshmi Roopkumar [Syncfusion]
Replied On 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.  

Magnus Johansson
Replied On 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

Vijayalakshmi Roopkumar [Syncfusion]
Replied On 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. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon