public void Load()
        {
            var namespaceName = GetType().Namespace;

            _skinColorResource = new ResourceDictionary
            {
                Source = new Uri("pack://application:,,,/" + namespaceName + ";component/Resources/" + ThemeColorResource + ".xaml", UriKind.Absolute)
            };

            _presentationManager.AddResourceDictionary(_skinColorResource);
        }
Exemple #2
0
        void HomePage_Loaded(object sender, RoutedEventArgs e)
        {
            var viewModel = DataContext as HomePageViewModel;

            if (viewModel != null)
            {
                viewModel.EnableActivePresentation();
            }

            _presentationManager.SetDefaultPageTitle();

            if (_dynamicResourceDictionary == null)
            {
                var namespaceName = typeof(DefaultTheme).Namespace;

                _dynamicResourceDictionary = new[] { "HomePageGlobals" }.Select(i => new ResourceDictionary
                {
                    Source = new Uri("pack://application:,,,/" + namespaceName + ";component/Resources/" + i + ".xaml", UriKind.Absolute)
                }).First();
            }

            _presentationManager.AddResourceDictionary(_dynamicResourceDictionary);

            if (viewModel != null)
            {
                viewModel.SetBackdrops();
            }
        }
Exemple #3
0
        public void Load()
        {
            _globalResources = GetGlobalResources().ToList();

            foreach (var resource in _globalResources)
            {
                _presentationManager.AddResourceDictionary(resource);
            }
        }