WPF Assigning control Properties using reflection in c sharp
问题 I am trying to create an application that creates objects from data that is read from an XML file. Using reflection I have managed to create the objects I need and assign some of the properties like primitive types and ENUM types. For primitive types where property is a Dictionary entry with the Property name to change and the value to set type.GetProperty((string)property.Key).SetValue(control, Convert.ChangeType((string)property.Value, propertyType, null), null); and for ENUM types object