SfSkinManager themes very slow

Hello

I have a demo application where a complex layout is loaded dynamically and then the SfSkinManager theme is applied to the main application window, using
SfSkinManager.SetVisualStyle(Application.Current.MainWindow, VisualStyles.Metro);
or
SfSkinManager.SetVisualStyle(Application.Current.MainWindow, VisualStyles.Office2019HighContrast);

When using Office2019HighContrast theme (and any other, like FluenLight, FluentDark, etc) there is a visible delay until the theme is applied. There's no delay when using Metro theme. The difference is clearly visible in the attached videos, where Office theme has a few seconds delay until applied.

I tried setting  SfSkinManager.ApplyStylesOnApplication=true or  SfSkinManager.ApplyStylesOnApplication=false, but there's no difference.



Attachment: SfSkinManager_compare_52ddc39e.zip

20 Replies 1 reply marked as answer

EM Elakkiya Muthukumarasamy Syncfusion Team April 15, 2021 12:34 PM UTC

Hi Tomislav, 

Greetings from Syncfusion. 

We have checked the reported query “SfSkinManager themes very slow” and we have tried to change the theme using RibbonComboBox and the button click. But we could not reproduce the issue our side. We have prepared the simple sample and video for the same. 




Please check the above sample and video our replication is same as yours. If not please modify the sample as issue reproduceable. It will be helpful to provide the prompt solution on this. 


Regards, 
Elakkiya 



TT Tomislav Tustonic April 15, 2021 11:24 PM UTC

Hello
Here's an approximate demo.
My application dynamically creates UI in the runtime, from the various components (ribbon, different main UI for various parts, etc.).
This is quite complex, and this demo simulates this.
The ribbon in the demo is taken from the Simplified Ribbon sample.
In the demo I dynamically load ribbon and main content in the Loaded event.
I tried setting a visual style in the constructor, after InitializeComponent, and in the OnLoaded event handler, but it's mostly the same... visible delay until the Office2019HighContrast theme is applied to all parts.

Thanks, Tom

Attachment: SyncfusionWpfApp2_18b18f91.zip


EM Elakkiya Muthukumarasamy Syncfusion Team April 16, 2021 12:26 PM UTC

Hi Tomislav, 

Thanks for your patience. 

We have checked the reported query “ThemeStudio themes applied late when dynamically creates UI in the runtime” and logged a bug report on this. The patch for this fix is expected to be available on 7th May 2021. You can track the status of the issue using the feedback link below.  


We appreciate your patience until then. 

Regards, 
Elakkiya 



TT Tomislav Tustonic April 16, 2021 12:37 PM UTC

Thanks!
Bye, Tom


VR Vijayalakshmi Roopkumar Syncfusion Team April 19, 2021 04:05 AM UTC

Hi Timuskav

Thank you for your update

We will update the patch as promised earlier on 7th May, 2021.

Regards,
Vijayalakshmi VR


TT Tomislav Tustonic April 19, 2021 12:24 PM UTC

Thanks
I'd really appreciate if you'd spell my name correctly.
It's Tomislav not Timuskav

Bye, Tom


VR Vijayalakshmi Roopkumar Syncfusion Team April 20, 2021 05:08 AM UTC

Hi Tomislav Tustonic 
 
Sorry for inconvenience caused. 
 
Please let us know if you need any other assistance on this. And as promised earlier, we will provide you the patch on 7th May, 2021. 
 
Regards, 
Vijayalakshmi VR 



EM Elakkiya Muthukumarasamy Syncfusion Team May 7, 2021 04:46 PM UTC

Hi Tom, 
 
Sorry for the inconvenience. 
 
As we are facing complexity in fixing the reported issue” ThemeStudio themes applied late when dynamically creates UI in the runtime, we need some more time to fix this behavior. We will fix and update the details on 12th May 2021. 
 
We appreciate your patience until then. 
 
Regards, 
Elakkiya 



VR Vijayalakshmi Roopkumar Syncfusion Team May 12, 2021 11:59 AM UTC

Hi Tom, 
 
As we facing some complexity in fixing this issue and also need to ensure all use case related with it. So we need time to check and fix on this and update the patch details on 17th May, 2021. 
 
We appreciate your patience until then. 
 
Regards, 
Vijayalakshmi VR 



VR Vijayalakshmi Roopkumar Syncfusion Team May 18, 2021 03:23 AM UTC

Hi Tom 
 
Thank you for your update. 
 
We have fixed this issue, but we need to ensure it in all use cases related with SfSkinManager. So we will check and update the details on or before 18th May, 2021. 
 
We appreciate your patience until then. 
 
Regards, 
Vijayalakshmi VR 



VR Vijayalakshmi Roopkumar Syncfusion Team May 19, 2021 02:58 AM UTC

Hi Tom

Thank you for your patience

As still we ned some time to ensure all use case, we will check and update the patch details by today.

We appreciate your patience until then.

Regards,
Vijayalakshmi VR


VR Vijayalakshmi Roopkumar Syncfusion Team May 19, 2021 04:33 PM UTC

Hi Tom 
  
 
Thanks for your patience.  
 
 
 The reported issue with SkinManager has been fixed and included in the patch which can be download from the below links.  
 
   
 
Recommended approach - exe will perform automatic configuration.   
 
 
Please find the patch setup from below location:    
 
 
  
 
Please find the patch assemblies alone from below location:  
 
 
  
 
 
Assembly Version: 19.1.0.54   
 
   
 
Installation Directions:   
 
This patch should replace the files "         
Themes.SystemTheme.WPF,Themes.Office2019Colorful.WPF,Themes.Office2019Black.WPF,Themes.Office2019DarkGray.WPF,Themes.Office2019White.WPF,Themes.Office2019HighContrast.WPF,Themes.Office2019HighContrastWhite.WPF,Themes.FluentDark.WPF,Themes.FluentLight.WPF,Themes.MaterialLight.WPF,Themes.MaterialDark.WPF,Themes.MaterialLightBlue.WPF,Themes.MaterialDarkBlue.WPF 
  
 
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\[TargetFramework]   
 
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\19.1.0.54\precompiledassemblies\19.1.0.54\4.6   
  
 
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you must manually copy and paste them to the preferred location or you must run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.   
 
   
 
 
   
 
Disclaimer:   
 
Please note that we have created this patch for version 19.1.0.54 specifically to resolve the issue reported in this incident. If you have received other patches for the same version for other products, please apply all patches in the order received.  Please let us know, if you are using any other Syncfusion version, we will provide patch in your version.   
 
Regards, 
Vijayalakshmi VR 



TT Tomislav Tustonic May 19, 2021 05:27 PM UTC

Hello
Thanks for the patch, it seems to work with version 19.1.0.54.
However, the latest version is already at 19.1.0.64, so it would be nice to keep the patch in sync with the main Nuget package.
I hope that the next Nuget update will include this patch

Bye, 
Tom


VR Vijayalakshmi Roopkumar Syncfusion Team May 20, 2021 10:07 AM UTC

Hi Tom, 
 
Thank you for your update. 
 
We will move this fix in our upcoming weekly nuget release and it expected to be published by 25th May, 2021.  
 
We will intimate you once it get published. 
 
Regards, 
Vijayalakshmi VR 



VR Vijayalakshmi Roopkumar Syncfusion Team May 25, 2021 07:47 AM UTC

Hi Tom 
 
Sorry for an inconvenience caused. 
 
Due to some internal issues, we not able to move this fix in today published nuget package. We will include this fix in our next nuget release. We will intimate you once it get published. 
 
Regards, 
Vijayalakshmi VR 



VR Vijayalakshmi Roopkumar Syncfusion Team June 8, 2021 07:38 AM UTC

Hi Tom 
 
Thank you for your patience. 
 
We have include the fix in today published nuget package. Please find it from following link: 
 
 
Please check this at your end and let us know if the issue resolved. 
 
Regards, 
Vijayalakshmi VR 


Marked as answer

TT Tomislav Tustonic June 8, 2021 11:32 PM UTC

Hello!

Thanks for the update.
It is better now, but not completely fixed, especially with more complex view and/or starting with maximized window.
In the attached project I'm starting with the maximized MainWindow.xaml, and using DockingManager in the MainView, with a lots of controls in its contents.

Initializing everything to Office2019HighContrast theme still shows a delay (although it's better than before).

Thanks, 
Tom

Attachment: SfThemeTest_ec9bcfae.zip


VR Vijayalakshmi Roopkumar Syncfusion Team June 9, 2021 10:45 AM UTC

Hi Tom 
 
Thank you for your update. 
 
We have provided the patch for the reported delay behavior in Ribbon control in latest SfSkinManager themes. This behavior occurs as we maintain the number of theme files for ribbon control to apply them. However we have reduced it and merged it as single dictionary file and provided the fix for the same. But now on observing the provided sample, we could able to see that you are integrating many syncfusion control and loading at a time in your application. So whenever on applying the SfSkinManager themes, it usually takes a time to merge all theme xaml files of each particular control and apply a theme for an application and we cannot reduce the time further. 
 
But in 2021 Volume 2 release, we are providing support for listing out the control names while setting theme which will restrict the action of finding controls in Visualtree to improve better performance. We will let you know once we rollout Volume 2, 2021 release by end of June 2021 
 
Please let us know if you need any other assistance on this. 
 
Regards, 
Vijayalakshmi VR 



TT Tomislav Tustonic June 9, 2021 09:01 PM UTC

Hello
Thanks for the reply.
This gave me an idea to add this in app.xaml:

<Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <sfskin:ResourceDictionaryProvider DictionaryName="Common" ThemeName="Office2019HighContrast"/>
                <sfskin:ResourceDictionaryProvider DictionaryName="Brushes" ThemeName="Office2019HighContrast"/>
                <sfskin:ResourceDictionaryProvider DictionaryName="Ribbon" ThemeName="Office2019HighContrast"/>
                <sfskin:ResourceDictionaryProvider DictionaryName="RibbonWindow" ThemeName="Office2019HighContrast"/>
                <sfskin:ResourceDictionaryProvider DictionaryName="DockingManager" ThemeName="Office2019HighContrast"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>

and it seems to work fine so far, no visible delay.
Theme and color switching is still a bit slow, but it doesn't matter, users will not change colors and themes very often.
I'll wait to see a new release, but now it's workable.

Thanks, Tom


VR Vijayalakshmi Roopkumar Syncfusion Team June 10, 2021 05:17 AM UTC

Hi Tom 
 
Thank you for your update. 
 
We are glad that your solution seems to be working fine to restrict visible delay. However we will intimate you once the fix included in our latest release Vol 2, 2021. 
 
Regards, 
Vijayalakshmi VR 


Loader.
Up arrow icon