Esempio n. 1
0
        private void ApplyBinding(BindingDef binding, IBindingContainer bindingContainer)
        {
            TargetProperty property = binding.ResolveAsTarget(this.bindingContainer);

            if (property != null)
            {
                object value = property.Value;
                SetProperty(binding, value);
            }
        }
Esempio n. 2
0
        private object AttemptConvert(BindingDef binding, object value, IBindingTarget container)
        {
            if (binding.HasValueConverter)
            {
                IValueConverter converter = binding.GetValueConverterInstance();
                value = converter.Convert(value, binding.ResolveAsTarget(container).Descriptor.PropertyType, binding, CultureInfo.CurrentCulture);
            }

            return(value);
        }
Esempio n. 3
0
        private void ExecuteCommandBind(BindingDef binding)
        {
            TargetProperty target = binding.ResolveAsTarget(this.BindingContainer);

            ExecuteCommandBind(target.OwningControl, binding);
        }