public static bool FromFile(string filename, out CustomAppTheme result) { var appTheme = new CustomAppTheme { Name = Path.GetFileNameWithoutExtension(filename) }; try { if (!IsAppThemeDictionary(appTheme.ResourceDictionary)) { result = null; return false; } } catch (XamlParseException) { result = null; return false; } result = appTheme; return true; }
public static bool FromFile(string filename, out CustomAppTheme result) { var appTheme = new CustomAppTheme { Name = Path.GetFileNameWithoutExtension(filename) }; try { if (!IsAppThemeDictionary(appTheme.ResourceDictionary)) { result = null; return(false); } } catch (XamlParseException) { result = null; return(false); } result = appTheme; return(true); }