BamlLocalization.BamlLocalizabilityByReflection.DependencyPropertyFromName C# (CSharp) 메소드

DependencyPropertyFromName() 개인적인 메소드

private DependencyPropertyFromName ( string propertyName, Type propertyType ) : DependencyProperty
propertyName string
propertyType System.Type
리턴 System.Windows.DependencyProperty
        private DependencyProperty DependencyPropertyFromName(string propertyName, Type propertyType)
        {
            FieldInfo fi = propertyType.GetField(propertyName + "Property", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy);
            return (fi != null)?fi.GetValue(null) as DependencyProperty:null;
        }