示例#1
0
 /// <summary>
 /// バインディングを追加します。
 /// </summary>
 public Binding Add(object bindableTarget, string bindingPropertyName,
                    object dataSource, string dataSourcePropertyName,
                    Converter.IValueConverter converter,
                    BindingPropertyChangedCallback propertyChanged = null,
                    CoerceBindingValueCallback coerceValue         = null)
 {
     return(Add(
                bindableTarget, bindingPropertyName,
                dataSource, dataSourcePropertyName,
                BindingMode.Default, converter,
                propertyChanged, coerceValue));
 }
示例#2
0
        /// <summary>
        /// バインディングを追加します。
        /// </summary>
        public Binding Add(object bindableTarget, string bindingPropertyName,
                           object dataSource, string dataSourcePropertyName,
                           BindingMode mode,
                           Converter.IValueConverter converter,
                           BindingPropertyChangedCallback propertyChanged = null,
                           CoerceBindingValueCallback coerceValue         = null)
        {
            var binding = new Binding
            {
                BindableTarget         = bindableTarget,
                BindingPropertyName    = bindingPropertyName,
                DataSource             = dataSource,
                DataSourcePropertyName = dataSourcePropertyName,
                Mode            = mode,
                Converter       = converter,
                PropertyChanged = propertyChanged,
                CoerceValue     = coerceValue,
            };

            return(Add(binding));
        }