Esempio n. 1
0
        void HomePage_Unloaded(object sender, RoutedEventArgs e)
        {
            var viewModel = DataContext as HomePageViewModel;

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

            _presentationManager.RemoveResourceDictionary(_dynamicResourceDictionary);
        }
Esempio n. 2
0
        public void Unload()
        {
            foreach (var resource in _globalResources)
            {
                _presentationManager.RemoveResourceDictionary(resource);
            }

            foreach (var resource in _globalResources.OfType <IDisposable>())
            {
                resource.Dispose();
            }

            _globalResources.Clear();
        }