private static ApplyResourceDictionary ( System.Windows.ResourceDictionary newRd, System.Windows.ResourceDictionary oldRd ) : void | ||
newRd | System.Windows.ResourceDictionary | |
oldRd | System.Windows.ResourceDictionary | |
return | void |
internal static void CopyResource(ResourceDictionary fromRD, ResourceDictionary toRD) { if (fromRD == null) { throw new ArgumentNullException("fromRD"); } if (toRD == null) { throw new ArgumentNullException("toRD"); } ThemeManager.ApplyResourceDictionary(fromRD, toRD); foreach (ResourceDictionary mergedDictionary in fromRD.MergedDictionaries) { ThemeManager.CopyResource(mergedDictionary, toRD); } }
public static void ChangeAppStyle(ResourceDictionary resources, Accent newAccent, AppTheme newTheme) { if (resources == null) { throw new ArgumentNullException("resources"); } if (newAccent == null) { throw new ArgumentNullException("newAccent"); } if (newTheme == null) { throw new ArgumentNullException("newTheme"); } ThemeManager.ApplyResourceDictionary(newAccent.Resources, resources); ThemeManager.ApplyResourceDictionary(newTheme.Resources, resources); }