Hello,
I have a NumericInput. I use it to insert a value with a Validation on the ApplyButton : http://i.imgur.com/d9cPbGK.png
I want to remove spaces before value.
Here is my code :
<ig:XamNumericInput x:Name="NewValue" Value="{Binding NewValue, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="2" Height="20" Width="70" Mask="nnnnn.nn" HorizontalAlignment="Left" SectionTabNavigation="NextSection" InvalidValueBehavior="DisplayErrorMessage"> <ig:XamNumericInput.Resources> <Style TargetType="{x:Type ig:XamNumericInput}"> <Setter Property="Background" Value="White"/> <Setter Property="Foreground" Value="Black" /> <Style.Triggers> <Trigger Property="IsEnabled" Value="False"> <Setter Property="Background" Value="White" /> <Setter Property="Foreground" Value="Gray" /> <Setter Property="Opacity" Value="0.93" /> </Trigger> </Style.Triggers> </Style> </ig:XamNumericInput.Resources> </ig:XamNumericInput>
Could you help me ?
Regards
Thank you for the feedback. I am glad that this approach helped you achieve the behavior you need.
Thanks for your help.
I added NewValue.PromptChar = '\0'; to my code behind as I use WPF and VS 2015.
Hi and thank you for posting!
When the Mask property is set the number of the digits that is expected to be entered corresponds to the value that was set for the mask. The prompt chars are displayed for the digits that are not entered. The default character is underscore “_”. If you would like you can change this by setting PromptChar property to “”. This will prevent the user from selecting the empty characters.Let me know if I could assist you with anything else.