/// <summary>
 /// Get a binding instance that can invoke a property change
 /// on the UI thread, regardless of the originating thread
 /// </summary>
 /// <param name="bindingControl">The UI control this binding is added to</param>
 /// <param name="propertyName">The property on the UI control to bind to</param>
 /// <param name="bindingSource">The source INotifyPropertyChanged to be
 /// observed for changes</param>
 /// <param name="dataMember">The property on the source to watch</param>
 /// <returns></returns>
 public static Binding GetBinding(Control bindingControl,
     string propertyName,
     INotifyPropertyChanged bindingSource,
     string dataMember)
 {
     AsyncBindingHelper helper
       = new AsyncBindingHelper(bindingControl, bindingSource, dataMember);
     return new Binding(propertyName, helper, "Value");
 }
예제 #2
0
        /// <summary>
        /// Get a binding instance that can invoke a property change
        /// on the UI thread, regardless of the originating thread
        /// </summary>
        /// <param name="bindingControl">The UI control this binding is added to</param>
        /// <param name="propertyName">The property on the UI control to bind to</param>
        /// <param name="bindingSource">The source INotifyPropertyChanged to be
        /// observed for changes</param>
        /// <param name="dataMember">The property on the source to watch</param>
        /// <returns></returns>
        public static Binding GetBinding(Control bindingControl,
                                         string propertyName,
                                         INotifyPropertyChanged bindingSource,
                                         string dataMember)
        {
            AsyncBindingHelper helper
                = new AsyncBindingHelper(bindingControl, bindingSource, dataMember);

            return(new Binding(propertyName, helper, "Value"));
        }