ThemesOfficeThemeCatalogRegistrar.Register is slow

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 6 years ago by Jim Foye
Version: 16.1.0636
Platform: .NET 4.7
Environment: Windows 7 (64-bit)

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 6 years ago by Actipro Software Support - Cleveland, OH, USA

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 (v24.1.2) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.