This question is locked. New answers and comments are not allowed.
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?
MainPage.xaml
ViewModel
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?
MainPage.xaml
<UserControl x:Class="BindingToIsExpandable_SL.MainPage" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:my="clr-namespace:BindingToIsExpandable_SL" mc:Ignorable="d" d:DesignHeight="100" d:DesignWidth="700"> <UserControl.Resources> <my:MyViewModel x:Key="MyViewModel"/> </UserControl.Resources> <Grid DataContext="{StaticResource MyViewModel}"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <telerik:RadNumericUpDown Margin="0,0,5,0" Width="75" Minimum="0" Maximum="100" ShowButtons="False" Value="{Binding Path=Value, Mode=TwoWay}" UpdateValueEvent="PropertyChanged" HorizontalAlignment="Left" IsEnabled="{Binding Path=Checked, Mode=TwoWay}" /> <CheckBox Grid.Row="1" Margin="5,5,0,0" IsChecked="{Binding Path=Checked, Mode=TwoWay}" Content="Toggle IsEnabled" telerik:StyleManager.Theme="Office_Black" /> </Grid> </UserControl>ViewModel
public class MyViewModel : INotifyPropertyChanged { private int _value; public int Value { get { return _value; } set { if ((!object.Equals(this._value, value))) { this._value = value; ChangeMax(); ChangeIsEnabled(); PropertyChanged(this, new PropertyChangedEventArgs("Value")); } } } private bool _checked; public bool Checked { get { return _checked; } set { 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; } }