/// <summary> Get the theme variant with the given variant name. If a theme variant with the given variant name is not found in the target theme, it will return null </summary> /// <param name="themeName"> Theme name to search for (the theme where the variant can be found) </param> /// <param name="variantName"> Variant name to search for (in the theme with the given id) </param> public ThemeVariantData GetVariant(string themeName, string variantName) { if (string.IsNullOrEmpty(themeName) || string.IsNullOrEmpty(variantName)) { return(null); } ThemeData themeData = Database.GetThemeData(themeName); return(themeData == null ? null : themeData.GetVariant(variantName)); }
/// <summary> Get the theme variant with the given variant name. If a theme variant with the given variant name is not found in the target theme, it will return null </summary> /// <param name="themeId"> Theme Guid to search for (the theme where the variant can be found) </param> /// <param name="variantName"> Variant name to search for (in the theme with the given id) </param> public ThemeVariantData GetVariant(Guid themeId, string variantName) { if (themeId == Guid.Empty || string.IsNullOrEmpty(variantName)) { return(null); } ThemeData themeData = Database.GetThemeData(themeId); return(themeData == null ? null : themeData.GetVariant(variantName)); }
/// <summary> Get the theme variant with the given variant id. If a theme variant with the given variant id is not found in the target theme, it will return null </summary> /// <param name="themeName"> Theme name to search for (the theme where the variant can be found) </param> /// <param name="variantId"> Variant Guid to search for (in the first theme with the given name) </param> public ThemeVariantData GetVariant(string themeName, Guid variantId) { if (string.IsNullOrEmpty(themeName) || variantId == Guid.Empty) { return(null); } ThemeData themeData = Database.GetThemeData(themeName); return(themeData == null ? null : themeData.GetVariant(variantId)); }
/// <summary> Get the theme variant with the given variant id. If a theme variant with the given variant id is not found in the target theme, it will return null </summary> /// <param name="themeId"> Theme Guid to search for (the theme where the variant can be found) </param> /// <param name="variantId"> Variant Guid to search for (in the theme with the given id) </param> public ThemeVariantData GetVariant(Guid themeId, Guid variantId) { if (themeId == Guid.Empty || variantId == Guid.Empty) { return(null); } ThemeData themeData = Database.GetThemeData(themeId); return(themeData == null ? null : themeData.GetVariant(variantId)); }