protected override void InitializeFieldControl(object Control, XtraContainerControlProperties ControlProperties)
        {
            base.InitializeFieldControl(Control, ControlProperties);

            if (Control is DevExpress.XtraEditors.ISupportStyleController)
            {
                ((DevExpress.XtraEditors.ISupportStyleController)Control).StyleController = this.layoutControl1;
            }
        }
 protected override void OnInitializeTextFieldControl(object Control, XtraContainerControlProperties FieldProperties)
 {
     base.OnInitializeTextFieldControl(Control, FieldProperties);
 }
        protected override void OnInitializeCustomFieldControl(object Control, XtraContainerControlProperties FieldProperties)
        {
            switch(FieldProperties.fieldContext.SpecifiedControlType)
            {
                case "AutoRefCombo":
                    ((DataAvail.DX.XtraEditors.AutoRefCombo)FieldProperties.control).DxEdit.DataProvider = new AutoRefComboDataProvider(FieldProperties.fieldContext);
                    break;
                case "LikeLookUpEdit":
                    ((DataAvail.DX.XtraEditors.AutoRefCombo)FieldProperties.control).DxEdit.DataProvider = new LikeLookUpEditDataProvider(
                        Controller.GetParentRelationDataSource(FieldProperties.fieldContext.ParentRelation),
                        FieldProperties.fieldContext);
                    break;
            }

            base.OnInitializeCustomFieldControl(Control, FieldProperties);
        }
 protected override void AddFieldControl(object Control, XtraContainerControlProperties XtraContainerControlProperties)
 {
     AddControl(Control, XtraContainerControlProperties.fieldContext.Name, XtraContainerControlProperties.fieldContext.Caption);
 }
        protected virtual object BuildField(XOFieldContext FieldContext)
        {
            bool isAdmitted = IsAdmittedField(FieldContext.Name);

            if (isAdmitted)
            {
                object ctl = GetSpecifiedControl(FieldContext.XOField);

                if (ctl == null)
                {
                    XtraContainerBuilderControlType controlType = GetControlType(FieldContext);

                    ctl = CreateFieldControl(controlType, FieldContext);

                    if (ctl != null)
                    {

                        XtraContainerControlProperties props = new XtraContainerControlProperties(ctl, controlType, FieldContext);

                        InitializeFieldControl(ctl, props);

                        BindFieldControl(ctl, FieldContext.Name, FieldContext.BindingProperty);

                        AddFieldControl(ctl, props);

                        ContainerControls.Add(FieldContext.XOField, ctl);
                    }

                    return ctl;
                }
                else
                {
                    BindFieldControl(ctl, FieldContext.Name, FieldContext.BindingProperty);

                    return null;
                }

                

            }
            else
            {
                return CreateEmptyControl();
            }
        }
 protected virtual void OnInitializeCustomFieldControl(object Control, XtraContainerControlProperties FieldProperties)
 {
 }
 protected virtual void AddFieldControl(object Control, XtraContainerControlProperties XtraContainerControlProperties)
 {
 }
 protected virtual void InitializeFieldControl(object Control, XtraContainerControlProperties FieldProperties)
 {
     switch (FieldProperties.controlType)
     {
         case XtraContainerBuilderControlType.Text:
             OnInitializeTextFieldControl(Control, FieldProperties);
             break;
         case XtraContainerBuilderControlType.Numeric:
             OnInitializeNumericFieldControl(Control, FieldProperties);
             break;
         case XtraContainerBuilderControlType.Date:
             OnInitializeDateFieldControl(Control, FieldProperties);
             break;
         case XtraContainerBuilderControlType.Combo:
             OnInitializeComboboxFieldControl(Control, FieldProperties);
             break;
         case XtraContainerBuilderControlType.Custom:
             OnInitializeCustomFieldControl(Control, FieldProperties);
             break;
     }
 }
        protected override void InitializeFieldControl(object Control, XtraContainerControlProperties ControlProperties)
        {
            ((System.Windows.Forms.Control)Control).Name = string.Format("ctl{0}", ControlProperties.fieldContext.Name);

            base.InitializeFieldControl(Control, ControlProperties);
        }