Esempio n. 1
0
        public bool AddContentBindingTarget(TargetControl bindingTarget)
        {
            if (bindingTarget == null || bindingTarget == this)
            {
                return(false);
            }

            if (contentBindingTargets == null)
            {
                contentBindingTargets = new List <ContentBindingHandle>();
            }
            else if (contentBindingTargets.Find(o => o.bindingTarget == bindingTarget) != null)
            {
                return(false);
            }

            contentBindingTargets.Add(new ContentBindingHandle(bindingTarget, bindingTarget.setup.contentBinding));

            if (control != null && control is UiControlText ctrlTxt)
            {
                ctrlTxt.isNameKeyField = true;
            }
            return(true);
        }
Esempio n. 2
0
 public ContentBindingHandle(TargetControl _bindingTarget, UiControlContentBinding _bindingType)
 {
     bindingTarget = _bindingTarget;
     bindingType   = _bindingType;
 }