public ViewBinding(ViewGroup view, object obj, Context context = null) { _model = obj; _modelType = obj.GetType(); List <View> views = view.GetDescendantViews(); _views = views.Where(x => x is IBoundView).Select(y => (IBoundView)y).ToList(); List <string> careProps = _views .Select(x => x.Binding).Where(x => x != null) .Union(_views.Where(x => x.VisibilityBinding != null) .Select(x => (x.VisibilityBinding.StartsWith("!")) ? x.VisibilityBinding.Substring(1) : x.VisibilityBinding)) .Distinct().ToList(); Type type = obj.GetType(); foreach (string prop in careProps) { if (prop == null) { continue; } string aProp = (prop.StartsWith("!")) ? prop.Substring(1) : prop; PropertyInfo propObj = type.GetProperty(aProp); if (propObj == null) { throw new ArgumentException("Object doesn't have property: " + aProp); } _props.Add(aProp, propObj); } foreach (IBoundView v in _views) { v.InitializeBind(this, _modelType, (v.Binding != null) ? _props[v.Binding] : null, obj, context); } }