Hi Krunal,
Greetings from Syncfusion.
Query 1: I tried adding horizontaloptions = Center but in that case, it stops showing the masked input control itself
While setting HorizontalOptions as Center, the control is rendered at the center of the TextInputLayout. It is a default behavior of SfMaskedEdit. Also, we have checked with Xamarin.Forms Entry control, it is also having same behavior. Please refer the below screenshot.
If you need to display the Value in center of the SfMaskedEdit, you can use HorizontalTextAlignment property as like the below snippet.
[XAML]:
…
<maskededit:SfMaskedEdit Mask="0 0 0 0 0 0"
PromptChar="_"
PasswordChar="*"
BackgroundColor="Transparent"
x:Name="otpEntry"
HorizontalTextAlignment="Center"/>
… |
Query 2: I want dashes where nos. will be entered evenly spaced in available space and dashes, I want of bigger width
We would like to inform that, “_” displayed in SfMaskedEdit are prompt characters, which is used to indicate the absence of your input in Mask. In source level, we have displayed prompt character for the provided Mask. While entering input, we have replaced the PromptChar with the typed input. There is no support for changing the width of the PromptChar.
To know more information about PromptChart. Please refer the below user guide link.
Query 3: I want to hide entered value same as password field
You can achieve this by setting PasswordChar property of MaskedEdit as per the below snippet.
[XAML]:
…
<maskededit:SfMaskedEdit Mask="0 0 0 0 0 0"
PromptChar="_"
PasswordChar="*"
BackgroundColor="Transparent"
x:Name="otpEntry"
HorizontalOptions="Center"/>
… |
To know more information about PasswordChar. Please refer the below document
Please let us know if you have any other queries.
Regards,
Vignesh.