BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Using SfTextInputLayout with a SfNumericTextBox, I have the following display problem:
If it doesn't have a number it looks like this:
When I load a number it looks like this:
This is the style:
<Style TargetType="syncfusion:SfNumericTextBox">
<Setter Property="FontFamily">
<Setter.Value>
<OnPlatform
x:TypeArguments="x:String"
Android="OpenSansBold.ttf#Open Sans Bold"
WinPhone="Assets/OpenSansBold.ttf#Open Sans Bold"
iOS="Open Sans Bold" />
</Setter.Value>
</Setter>
<Setter Property="TextColor" Value="#D3005B" />
<Setter Property="BackgroundColor" Value="#FFFFFF" />
<Setter Property="VerticalOptions" Value="FillAndExpand" />
<Setter Property="HorizontalOptions" Value="FillAndExpand" />
</Style>
<Style x:Key="TextInputLayoutStyle" TargetType="sfText:SfTextInputLayout">
<Setter Property="UnfocusedColor" Value="#D3005B" />
<Setter Property="ContainerType" Value="Outlined" />
<Setter Property="VerticalOptions" Value="FillAndExpand" />
<Setter Property="OutlineCornerRadius" Value="4" />
<Setter Property="ContainerBackgroundColor" Value="#FFFFFF" />
<Setter Property="FocusedColor" Value="#D3005B" />
<Setter Property="ReserveSpaceForAssistiveLabels" Value="False" />
<Setter Property="InputViewPadding" Value="8,4,0,4" />
<Setter Property="Margin" Value="0,-3,0,0" />
<Setter Property="FocusedStrokeWidth" Value="1" />
</Style>
And the code:
<sfText:SfTextInputLayout Grid.Column="0" Style="{DynamicResource TextInputLayoutStyleNumeric}">
<syncfusion:SfNumericTextBox
AllowNull="False"
FontSize="13"
FormatString="%"
HorizontalOptions="Start"
Value="{Binding Path = MARGEN}" />
</sfText:SfTextInputLayout>
Hi Gerardo Lopez Ruiz,
We prepared a sample with the provided code snippet, and checked the reported problem “Numeric Text is not displayed correctly when Using SfTextInputLayout with a SfNumericTextBox”. But we are unable to reproduce the problem on our side. Please get the tested sample from the below attachment.
If you still face any problem, please revert us by modifying the sample based on your application scenario. This will allow us to assist you with a better solution as soon as possible.
Regards,
Eswaran
The HorizontalOptions property is equal to Start and should be FillAndExpand so that it occupies all the space inside the SfTextInputLayout. Thank you very much.
We are glad that the reported problem is resolved at your end. Please let us know if you require any further assistance.