using System.Windows; namespace MultiLayout { /// /// 公共类 /// public static class Common { public static string GetStringFromResourceDictionary(string key, string defaultValue) { string value = (string)Application.Current.TryFindResource(key); if (value == null) { return defaultValue; } return value; } } }