public static void BindTransform <TModel, TView>( this object control, string controlProperty, object model, string modelProperty, TransformPropertyObserver <TModel, TView> transform) { var observer = model.ObserveProperty <TModel>(modelProperty); transform.Init(observer); new ControlPropertyObserver <TView>(control, transform, controlProperty); }
public static void BindTransformString <TModel, TTransformed>( this object control, string controlProperty, object model, string modelProperty, TransformPropertyObserver <TModel, TTransformed> transform) { var observer = model.ObserveProperty <TModel>(modelProperty); transform.Init(observer); new ControlPropertyObserver <string>(control, new StringPropertyObserver <TTransformed>(transform), controlProperty); }