/// <summary> /// Helper. /// </summary> protected Type GetPropertyTypeByTag(object tag) { if (tag is string) {// Is generic dynamic property. return(_selectedObject.GetPropertyType(tag as string)); } // Is normal property. PropertyInfo info = (PropertyInfo)tag; if (Nullable.GetUnderlyingType(info.PropertyType) != null) {// Is nullable, establish underlying. return(Nullable.GetUnderlyingType(info.PropertyType)); } else {// Direct aquisition. return(info.PropertyType); } }