Example #1
0
        internal void UpdateThemeResources(Theme oldTheme = null)
        {
            if (oldTheme != null)
            {
                var resourceDictionaryToRemove =
                    Resources.MergedDictionaries.FirstOrDefault(r => r.Source == oldTheme.GetResourceUri());
                if (resourceDictionaryToRemove != null)
                    Resources.MergedDictionaries.Remove(
                        resourceDictionaryToRemove);
            }

            if (_manager.Theme != null)
            {
                Resources.MergedDictionaries.Add(new ResourceDictionary {Source = _manager.Theme.GetResourceUri()});
            }
        }
        internal override void UpdateThemeResources(Theme oldTheme = null)
        {
            base.UpdateThemeResources(oldTheme);

            if (_overlayWindow != null)
                _overlayWindow.UpdateThemeResources(oldTheme);
        }