ThemesOfficeThemeCatalogRegistrar.Register is slow

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 8 months ago by Jim Foye
Version: 16.1.0636
Environment: Windows 7 (64-bit)
Avatar

I call ThemesOfficeThemeCatalogRegistrar.Register() in my application's startup. I am supposed to do that, right? I was trying to pin point some slowness in app startup, and I realized that this call takes almost 500 milliseconds. Can it possibly be optimized? Thanks.

Comments (1)

Answer - Posted 7 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Jim,

That method call is effectively just putting XAML resource dictionaries in your Application.Resources.  When I step over that line in our sample app, it goes much faster (< 1ms).  But note we also wrap all our ThemeManager setup in ThemeManager.BeginUpdate()/EndUpdate() calls.  Are you doing that in your startup as well?  That will help prevent additional updates before you've completed all your ThemeManager configuration.


Actipro Software Support

The latest build of this product (v2018.1 build 0675) was released 14 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.