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; }
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); }