private static void CheckForInstanceProperties(object view, MemberInfo member, UIView elementView)
{
var cellViewTemplate = member.GetCustomAttribute<CellViewTemplate>(true);
if (cellViewTemplate != null)
{
if (!string.IsNullOrEmpty(cellViewTemplate.InstancePropertyName))
{
var instanceProperty = view.GetType().GetProperty(cellViewTemplate.InstancePropertyName, BindingFlags.IgnoreCase | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance);
if (instanceProperty != null)
{
UIView instanceView = elementView;
instanceProperty.SetValue(view, instanceView);
}
}
}
}