Hi,
I am moving from MaskedTextBox to RadMaskedNumericInput, but have a problem. My control represents minutes. It is at most 99, minimum 0, always displays 2 digits so has leading 0s. For 0 it displays 00, for 1 it displays 01, and for 12 it displays 12. You should be able to set the value to 0 by typing 0 or 00, either is ok, but just 0 would be preferred. Currently I have
<Controls:RadMaskedTextBox x:Name="txtMinutes" Value="{Binding Minutes, ElementName=root, Mode=TwoWay}" UpdateValueEvent="LostFocus"
IsReadOnly="{Binding ReadOnly, ElementName=root}"
Mask="d2" MaskType="Numeric" Width="23" Grid.Column="4" BorderThickness="0" />
Which is working ok. So I tried to migrate to MaskedNumericInput, but I cannot find a combination of properties which work. I currently have
<telerik:RadMaskedNumericInput MinWidth="100" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
IsClearButtonVisible="False" Mask="#2"
InputBehavior="Insert"
Value="{Binding Hours, Mode=TwoWay}" Placeholder="0"
FormatString="{}{0:00}" BorderThickness="2" SelectionOnFocus="SelectAll"
/>
And this is bound to a decimal property, but it will not accept 0, it just ignores it and displays an empty string on losing focus without pushing 0 back to the bound property. Please advise setting that will replicate the behavior of the old MaskedTextBox.
Thanks,
Scott
I am moving from MaskedTextBox to RadMaskedNumericInput, but have a problem. My control represents minutes. It is at most 99, minimum 0, always displays 2 digits so has leading 0s. For 0 it displays 00, for 1 it displays 01, and for 12 it displays 12. You should be able to set the value to 0 by typing 0 or 00, either is ok, but just 0 would be preferred. Currently I have
<Controls:RadMaskedTextBox x:Name="txtMinutes" Value="{Binding Minutes, ElementName=root, Mode=TwoWay}" UpdateValueEvent="LostFocus"
IsReadOnly="{Binding ReadOnly, ElementName=root}"
Mask="d2" MaskType="Numeric" Width="23" Grid.Column="4" BorderThickness="0" />
Which is working ok. So I tried to migrate to MaskedNumericInput, but I cannot find a combination of properties which work. I currently have
<telerik:RadMaskedNumericInput MinWidth="100" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
IsClearButtonVisible="False" Mask="#2"
InputBehavior="Insert"
Value="{Binding Hours, Mode=TwoWay}" Placeholder="0"
FormatString="{}{0:00}" BorderThickness="2" SelectionOnFocus="SelectAll"
/>
And this is bound to a decimal property, but it will not accept 0, it just ignores it and displays an empty string on losing focus without pushing 0 back to the bound property. Please advise setting that will replicate the behavior of the old MaskedTextBox.
Thanks,
Scott