public static async Task ApplyAsync(System.Windows.Application application, AppThemeDictionary themeResources) { ValidationHelper.NotNull(application, "application"); ValidationHelper.NotOfType(application, "application", typeof(Application), UseThemeResources); ValidationHelper.NotNull(themeResources, "themeResources"); await application.Dispatcher.InvokeAsync(() => Manager.ApplyInternal(application, themeResources), DispatcherPriority.Send); }
internal static void ApplyInternal(System.Windows.Application application, AppThemeDictionary themeResources) { ValidationHelper.NotNull(application, "application"); ValidationHelper.NotNull(themeResources, "themeResources"); ApplyCore(application.Resources, themeResources); Cache.Iterate(cachedControl => ApplyInternal(cachedControl, General.GetThemeResources(cachedControl))); }
public static DispatcherOperation BeginApply(System.Windows.Application application, AppThemeDictionary themeResources) { ValidationHelper.NotNull(application, "application"); ValidationHelper.NotOfType(application, "application", typeof(Application), UseThemeResources); ValidationHelper.NotNull(themeResources, "themeResources"); return(application.Dispatcher.BeginInvoke(() => Manager.ApplyInternal(application, themeResources), DispatcherPriority.Send)); }