コード例 #1
0
        internal DataBinding(DataBindingRegistration <TLayerProperty, TProperty> dataBindingRegistration)
        {
            LayerProperty = dataBindingRegistration.LayerProperty;
            Entity        = new DataBindingEntity();

            ApplyRegistration(dataBindingRegistration);
            Save();
            ApplyDataBindingMode();
        }
コード例 #2
0
        internal DataBinding(LayerProperty <TLayerProperty> layerProperty, DataBindingEntity entity)
        {
            LayerProperty = layerProperty;
            Entity        = entity;

            // Load will add children so be initialized before that
            Load();
            ApplyDataBindingMode();
        }
コード例 #3
0
        /// <inheritdoc />
        public IDataBinding CreateDataBinding()
        {
            if (DataBinding != null)
            {
                return(DataBinding);
            }

            DataBindingEntity dataBinding = LayerProperty.Entity.DataBindingEntities.FirstOrDefault(e => e.TargetExpression == PropertyExpression.ToString());

            if (dataBinding == null)
            {
                return(null);
            }

            DataBinding = new DataBinding <TLayerProperty, TProperty>(LayerProperty, dataBinding);
            return(DataBinding);
        }