Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1700
How to remove spaces before value
posted

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

Parents
  • 17475
    Verified Answer
    Offline posted

    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.

Reply Children