private void ChangePomodoroContent(Type type) { var properties = new Dictionary <string, string> { { "ViewType", SettingsService.Current.ViewType }, }; Analytics.TrackEvent("ChangePomodoroContent", properties); var properties2 = new Dictionary <string, string> { { "RegionAndViewType", Windows.System.UserProfile.GlobalizationPreferences.HomeGeographicRegion + " - " + SettingsService.Current.ViewType } }; Analytics.TrackEvent("ChangePomodoroContentCombination", properties2); var view = Activator.CreateInstance(type) as PomodoroView; PomodoroContent.Content = view; RequestedTheme = (view as FrameworkElement).RequestedTheme; var attributes = type.GetCustomAttributes(true); _currentCompactOverlayAttribute = attributes.OfType <CompactOverlayAttribute>().FirstOrDefault(); UpdateButtonsVisibility(); }
private void ChangePomodoroContent(Type type) { var view = Activator.CreateInstance(type) as PomodoroView; PomodoroContent.Content = view; RequestedTheme = (view as FrameworkElement).RequestedTheme; var attributes = type.GetCustomAttributes(true); _currentCompactOverlayAttribute = attributes.OfType <CompactOverlayAttribute>().FirstOrDefault(); UpdateButtonsVisibility(); }