public static ResourceDictionary CreateThemeResourceDictionary(this EditorFormatDefinition def, ITheme theme)
 {
     if (def is IThemeFormatDefinition themeDef)
     {
         return(themeDef.CreateResourceDictionary(theme));
     }
     return(def.CreateResourceDictionary());
 }
        public static ResourceDictionary CreateThemeResourceDictionary(this EditorFormatDefinition def, ITheme theme)
        {
            var themeDef = def as IThemeFormatDefinition;

            if (themeDef != null)
            {
                return(themeDef.CreateResourceDictionary(theme));
            }
            return(def.CreateResourceDictionary());
        }