Hiding Prompt Characters in .NET MAUI Masked Entry (SfMaskedEntry)

22 Apr 20251 minute to read

When the HidePromptOnLeave property is set to true, prompt characters are ignored when the control loses focus. Again, the prompt characters are restored when the control is focused.

<editors:SfMaskedEntry x:Name="maskedEntry" 
                       Placeholder="Enter here"
                       MaskType="Simple"
                       Mask="00/00/0000" 
                       PromptChar="#"
                       HidePromptOnLeave="True" />
SfMaskedEntry maskedEntry = new SfMaskedEntry();
maskedEntry.Placeholder="Enter here";
maskedEntry.MaskType = MaskedEntryMaskType.Simple;
maskedEntry.Mask = "00/00/0000";
maskedEntry.PromptChar = '#';
maskedEntry.HidePromptOnLeave = true;

HidePromptOnLeave