public static bool FromFile(string filename, out CustomAccentColor result) { var accentColor = new CustomAccentColor { Name = new FileInfo(filename).Name }; try { if (!ThemeManager.IsAccentDictionary(accentColor.ResourceDictionary)) { result = null; return false; } } catch (XamlParseException) { result = null; return false; } result = accentColor; return true; }
public static bool FromFile(string filename, out CustomAccentColor result) { var accentColor = new CustomAccentColor { Name = new FileInfo(filename).Name }; try { if (!ThemeManager.IsAccentDictionary(accentColor.ResourceDictionary)) { result = null; return(false); } } catch (XamlParseException) { result = null; return(false); } result = accentColor; return(true); }