protected override Control GetControl()
        {
            DependencyProperty dependencyProperty = this.GetControlBindingProperty();
            RadNumericUpDown numericUpDown = new RadNumericUpDown();
            if (this.DataMemberBinding != null)
            {
                var binding = this.DataMemberBinding;
                numericUpDown.SetBinding(dependencyProperty, binding);
            }
            numericUpDown.SetBinding(RadNumericUpDown.IsEnabledProperty, new Binding("IsReadOnly") { Source = this, Converter = new InvertedBooleanConverter() });

            return numericUpDown;
        }
Exemplo n.º 2
0
        protected override Control GetControl()
        {
            DependencyProperty dependencyProperty = this.GetControlBindingProperty();
            RadNumericUpDown   numericUpDown      = new RadNumericUpDown();

            if (this.DataMemberBinding != null)
            {
                var binding = this.DataMemberBinding;
                numericUpDown.SetBinding(dependencyProperty, binding);
            }
            numericUpDown.SetBinding(RadNumericUpDown.IsEnabledProperty, new Binding("IsReadOnly")
            {
                Source = this, Converter = new InvertedBooleanConverter()
            });

            return(numericUpDown);
        }
        protected override System.Windows.Controls.Control GetControl()
        {
            var numeric = new RadNumericUpDown()
            {
                Minimum   = 1,
                Maximum   = 5,
                IsInteger = true
            };

            if (this.DataMemberBinding != null)
            {
                numeric.SetBinding(this.GetControlBindingProperty(), this.DataMemberBinding);
            }

            return(numeric);
        }