static WelcomePageBranding() { try { using (var stream = BrandingService.GetStream("WelcomePageContent.xml")) { Content = XDocument.Load(stream); } } catch (Exception ex) { LoggingService.LogError("Error while reading welcome page contents.", ex); using (var stream = typeof(WelcomePageBranding).Assembly.GetManifestResourceStream("WelcomePageContent.xml")) { Content = XDocument.Load(stream); } } try { HeaderTextSize = BrandingService.GetString("WelcomePage", "HeaderTextSize") ?? HeaderTextSize; HeaderTextColor = BrandingService.GetString("WelcomePage", "HeaderTextColor") ?? HeaderTextColor; BackgroundColor = BrandingService.GetString("WelcomePage", "BackgroundColor") ?? BackgroundColor; TextColor = BrandingService.GetString("WelcomePage", "TextColor") ?? TextColor; TextSize = BrandingService.GetString("WelcomePage", "TextSize") ?? TextSize; LinkColor = BrandingService.GetString("WelcomePage", "LinkColor") ?? LinkColor; Spacing = BrandingService.GetInt("WelcomePage", "Spacing") ?? Spacing; LogoHeight = BrandingService.GetInt("WelcomePage", "LogoHeight") ?? LogoHeight; } catch (Exception e) { LoggingService.LogError("Error while reading welcome page branding.", e); } }