RadNumericUpDown not disabling correctly

2 posts, 0 answers
  1. Peter
    Peter avatar
    8 posts
    Member since:
    Feb 2013

    Posted 20 Feb 2013 Link to this post

    Dear Telerik,

    The visual state of our RadNumericUpDown elements don't always correctly adapt to the property IsChecked.
    I made a small example project showing the issue.

    By enabling the RadNumericUpDown
    and typing a number > 50, the value should change to 100 and the RadNumericUpDownhas to get disabled.
    What happens is that the value changes and the RadNumericUpDown is disabled (you can't select it or type in it).
    But It does not get the 'disabled color' it should get, making it unclear to the user that it is in fact disabled.

    Is there a fix for this bug?

    <UserControl x:Class="BindingToIsExpandable_SL.MainPage"
                 mc:Ignorable="d" d:DesignHeight="100" d:DesignWidth="700">
            <my:MyViewModel x:Key="MyViewModel"/>      
        <Grid DataContext="{StaticResource MyViewModel}">
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto" />
                Value="{Binding Path=Value, Mode=TwoWay}"
                IsEnabled="{Binding Path=Checked, Mode=TwoWay}" />
                IsChecked="{Binding Path=Checked, Mode=TwoWay}"
                Content="Toggle IsEnabled"
                telerik:StyleManager.Theme="Office_Black" />

    public class MyViewModel : INotifyPropertyChanged
            private int _value;
            public int Value
                get { return _value; }
                    if ((!object.Equals(this._value, value)))
                        this._value = value;
                        PropertyChanged(this, new PropertyChangedEventArgs("Value"));
            private bool _checked;
            public bool Checked
                get { return _checked; }
                    if ((!object.Equals(this._checked, value)))
                        this._checked = value;
                        PropertyChanged(this, new PropertyChangedEventArgs("Checked"));
            public event PropertyChangedEventHandler PropertyChanged;
            private void ChangeMax()
                if (Value > 50)
                    _value = 100;
            private void ChangeIsEnabled()
                if (Value == 100)
                    Checked = false;

  2. Boyan
    Boyan avatar
    758 posts

    Posted 25 Feb 2013 Link to this post

    Hi Peter,

    We managed to reproduce the issue thanks to your project. It appears rather random and it seems that the problem is some synchronization issue. I have logged the issue in our PITS where you can follow its progress.

    Please, excuse us for the inconvenience. We have added points to your account for the report. Don't hesitate to contact us if you have other questions.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top