Example #1
0
 internal static string GetUserThemeName(IUserThemeProvider themeProvider)
 {
     if (themeProvider != null)
     {
         return(themeProvider.ThemeName);
     }
     return((string)null);
 }
Example #2
0
        private string GetDefaultStyleName()
        {
            string str = (string)null;

            if (this.DesignerContext != null && this.DesignerContext.ActiveProject != null && this.DesignerContext.ActiveProject.GetCapability <bool>("ExpressionBlendPrototypingEnabled"))
            {
                IUserThemeProvider userThemeProvider = (IUserThemeProvider)Enumerable.FirstOrDefault <ResourceDictionaryAssetProvider>(this.FindAssetProviders <ResourceDictionaryAssetProvider>(), (Func <ResourceDictionaryAssetProvider, bool>)(provider => provider.ResourceDictionaryUsage.HasFlag((Enum)ResourceDictionaryUsage.PrototypingDefaultStyles)));
                if (userThemeProvider != null)
                {
                    str = userThemeProvider.ThemeName;
                }
            }
            return(str);
        }