/// <summary> /// Adds a new binding to the control with a direct value binding /// </summary> /// <param name="controlBinding">Binding to get/set the value from the control.</param> /// <param name="valueBinding">Value binding to get/set the value from another source.</param> /// <param name="mode">Mode of the binding</param> public DualBinding <T> Bind <T>(IndirectBinding <T> controlBinding, DirectBinding <T> valueBinding, DualBindingMode mode = DualBindingMode.TwoWay) { var binding = new ControlBinding <Control, T>(this, controlBinding); return(binding.Bind(sourceBinding: valueBinding, mode: mode)); }
public DualBinding <T> Bind <T>(IndirectBinding <T> controlBinding, IndirectBinding <T> dataContextBinding, DualBindingMode mode = DualBindingMode.TwoWay, T defaultControlValue = default(T), T defaultContextValue = default(T)) { var binding = new ControlBinding <Control, T>(this, controlBinding); return(binding.Bind(dataContextBinding, mode, defaultControlValue, defaultContextValue)); }