I have a RadMaskedNumericInput as follows:
<telerik:RadMaskedNumericInput Grid.Row="0" Grid.Column="1" Width="55"
Mask=""
FormatString="n2"
Value="{Binding TotalFeedVolume}"
IsClearButtonVisible="False"
/>
When I click on the left of the initial zero, it moves my cursor right in front of the decimal point. This is a bit frustrating, as I couldn't, for example, just easily make it "10" with one keystroke. Any way to fix this?
Is there a property I can set so that the RadMaskedNumericInput field only shows the thousands separator when the value gets over 1,000? It doesn't look great that the commas appear before the value is high enough to need them.
Is there a control in WPF that I can use for numeric input that looks just like a textbox, but doesn't allow anything non-numeric? I've looked at "Masked Input", and don't like the look nor the behavior (e.g. I don't like to see the template, and putting the curser at the beginning of field and hitting a number puts the number in the first digit and fills the rest with zeroes - nothing like a TextBox). I've also looked at the "Numeric UpDown", but haven't found a simple example that looks like a TextBox - all the examples show with the up and down arrows, which I don't want. I'm sure it's just a matter of formatting/templating/whatever, but I'm not a UI guy - I just want to drop the control on my form and maybe tweak a few parameters.
I would just use a TextBox bound to an integer, but the problem with that is if the user enters something non-numeric, a conversion exception is thrown, rather than a validation error. At that point the form validates just fine because the backing field hasn't actually changed yet, so the user can, for example, hit [Save] while there are errors shown on the screen, and the [Save] logic thinks all is well.
Any ideas?
Thanks!
Brad.
Hello,
I'm using a RadMaskedTextInput and I'm wondering if it's possible to change the foreground color of just the placeholders?
What I'm trying to accomplish is for every X in below image to appear in a brighter color than the text typed in by the user.
What my RadMaskedTextInput looks like currently:
What I want the foreground to look like:
Hi,
Would it be possible to have an editable RadMasked Part to mimic the RadWatermarkTextBox with floating Label?
Sometimes when I paste a test intro en empty RadMaskedTextInput, the application crushes and the following error occurs:
FATAL Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Text.StringBuilder.Remove(Int32 startIndex, Int32 length)
at Telerik.Windows.Controls.RadMaskedTextInput.HandlePasteNoMask(Object value, Object& returnString)
at Telerik.Windows.Controls.RadMaskedTextInput.HandlePasteOverride(Object value, Object& returnString)
at Telerik.Windows.Controls.RadMaskedInputBase.HandlePaste()
at Telerik.Windows.Controls.RadMaskedInputBase.OnApplicationPaste(Object sender, ExecutedRoutedEventArgs e)
at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
at System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
at System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)
at System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
at System.Windows.Input.RoutedCommand.ExecuteCore(Object parameter, IInputElement target, Boolean userInitiated)
at System.Windows.Input.CommandManager.TranslateInput(IInputElement targetElement, InputEventArgs inputEventArgs)
at System.Windows.UIElement.OnKeyDownThunk(Object sender, KeyEventArgs e)
at System.Windows.Input.KeyEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)
at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Hello,
I have a RadMaskedTextInput that I'm using for a phone number.
If I clear the form, and set the txtDriverNumber (that's the name of the field) using txtDriverNumber.Text = "" (and I also tried string.Empty) it looks like it clears the value correctly.
However, when the textbox gets focus again, it puts back in the last entered data. I don't want it to do that, is there something I can do to make sure it doesn't remember previous values?
Hi Telerik Team,
We are using RadMaskedCurrencyInput inside RadGridView as RowDetailTemplate. But the performance is very poor, as it takes nearly 100 milliseconds for each number typing.
Also, it takes 2 to 4 seconds when we perform Select All and typing the number.
This happens only if the control is placed inside the RadGridView.
We have the same control outside the RadGridView for testing purpose which performs good.
Please let me know if any optimization can be done with this.
Below are the code we are using.
<tk:RadMaskedCurrencyInput
maskedInput:MaskedInputExtensions.MaxTextLength="5"
maskedInput:MaskedInputExtensions.Minimum="0"
FontSize="12"
FontWeight="DemiBold"
IsCurrencySymbolVisible="False"
Mask=""
SpinMode="None"
TextMode="PlainText" />
I'm not able to attach the video file here.
Thank You.
I have this property
private double? _netFreqValue;
public double? NetFreqValue
{
get => _netFreqValue;
set
{
if(_netFreqValue == value) return;
_netFreqValue = value;
this.OnPropertyChanged();
}
}
and im trying to set the EmptyContent property to nothing(empty string) when the value is null
this works fine
<RadMaskedNumericInput
Mask = "#4.3"
AllowInvalidValues = "False"
EmptyContent = ""
UpdateValueEvent = "LostFocus"
Value = "{Binding NetFreqValue, Mode=TwoWay, UpdateSourceTrigger = PropertyChanged}" />
but this does not
<RadMaskedNumericInput
Mask = "#4.3"
AllowInvalidValues = "False"
EmptyContent = ""
UpdateValueEvent = "LostFocus">
<RadMaskedNumericInput.Value>
<Binding Path=""NetFreqValue"
UpdateSourceTrigger="PropertyChanged"
Mode="TwoWay">
<Binding.ValidationRules>
//some validations
</Binding.ValidationRules>
</Binding>
</RadMaskedNumericInput.Value>
</RadMaskedNumericInput>