public void SetValue(T Value) { bool success = false; if (ViewBinder != null && !String.IsNullOrWhiteSpace(PropertyName) && CanWrite) { success = ViewBinder.SetValue(PropertyName, Value); } if (!success) { RaiseBindFailEvent(BindAction.Set, PropertyName); } }
public override bool TrySetMember(SetMemberBinder Binder, Object Value) { bool success = false; String memberName = Binder.Name == "Value" && !String.IsNullOrWhiteSpace(PropertyName) ? PropertyName : Binder.Name; if (ViewBinder != null && !String.IsNullOrWhiteSpace(memberName) && CanWrite) { success = ViewBinder.SetValue(memberName, Value); } if (!success) { RaiseBindFailEvent(BindAction.Set, memberName); } return(true); }