Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
PasswordMask.cs
2{
7 public class PasswordMask : BindableObject
8 {
12 public static readonly BindableProperty IsEnabledProperty = BindableProperty.CreateAttached("IsEnabled", typeof(bool), typeof(PasswordMask),
13 defaultValue: true,
14 propertyChanged: (bindable, oldValue, newValue) =>
15 {
16 if (bindable is Entry Entry)
17 {
18 string TogglerEffectName = $"{Constants.Effects.ResolutionGroupName}.{Constants.Effects.PasswordMaskTogglerEffect}";
19 if (!Entry.Effects.Any(Effect => Effect.ResolveId == TogglerEffectName))
20 {
21 Effect Effect = Effect.Resolve(TogglerEffectName);
22 Entry.Effects.Add(Effect);
23 }
24 }
25 });
26
30 public static bool GetIsEnabled(BindableObject bindable)
31 {
32 return (bool)bindable.GetValue(IsEnabledProperty);
33 }
34
38 public static void SetIsEnabled(BindableObject bindable, bool value)
39 {
40 bindable.SetValue(IsEnabledProperty, value);
41 }
42 }
43}
PasswordMask is a class which defines IsEnabled attached BindableProperty used to store the state of ...
Definition: PasswordMask.cs:8
static readonly BindableProperty IsEnabledProperty
Implements the attached property that indicates if the Entry password must be masked.
Definition: PasswordMask.cs:12
static bool GetIsEnabled(BindableObject bindable)
Gets the value indicating if the password associated with bindable must be masked.
Definition: PasswordMask.cs:30
static void SetIsEnabled(BindableObject bindable, bool value)
Sets the value indicating if the password associated with bindable must be masked.
Definition: PasswordMask.cs:38