public override System.Windows.FrameworkElement CreateControl(FormControlLib.FormItemContext context)
        {
            // create control
            var inputctl = new AddressCombobox();

            // set style
            inputctl.Style = Application.Current.Resources["edit_controlbase"] as Style;

            // set binding
            var binding = new Binding(context.PropertyInfo.Name)
            {
                Mode = BindingMode.TwoWay,
            };
            inputctl.SetBinding(WatermarkTextBox.TextProperty, binding);

            // set validation
            CustomValidation.SetValidationOptOut(inputctl);

            return inputctl;
        }
Ejemplo n.º 2
0
        public override System.Windows.FrameworkElement CreateControl(FormControlLib.FormItemContext context)
        {
            // create control
            var inputctl = new AddressCombobox();

            // set style
            inputctl.Style = Application.Current.Resources["edit_controlbase"] as Style;

            // set binding
            var binding = new Binding(context.PropertyInfo.Name)
            {
                Mode = BindingMode.TwoWay,
            };

            inputctl.SetBinding(WatermarkTextBox.TextProperty, binding);

            // set validation
            CustomValidation.SetValidationOptOut(inputctl);

            return(inputctl);
        }