Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How to only show 5 characters of the password?

$
0
0

I want to only show 5 characters of the password when it's saved. I tried something but it's always showing the 5 characters even when the password is not saved.

 if (((TimeSpan)(DateTime.UtcNow - Settings.LastLoginDate)).Days > 10)
    {
        Password.Value = "";
    }
    else
    {
        Password.Value = LastPassword;
    }

        <Entry
            IsPassword="True"
            Placeholder="password"
            Text="{Binding Password.Value, Mode=TwoWay}">

            <Entry.Behaviors>
                <behaviors:EventToCommandBehavior
                    Command="{Binding ValidatePasswordCommand}"
                    EventName="TextChanged" />
            </Entry.Behaviors>
            <Entry.Triggers>
                <DataTrigger
                    Binding="{Binding Password.IsValid}"
                    TargetType="Entry"
                    Value="False">
                    <Setter Property="behaviors:LineColorBehavior.LineColor" Value="{DynamicResource ErrorColor}" />
                </DataTrigger>
            </Entry.Triggers>
            <Entry.Effects>
                <effects:ClearEntryEffect />
            </Entry.Effects>
        </Entry>

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>