1using System.ComponentModel;
2using System.Globalization;
3using CommunityToolkit.Mvvm.ComponentModel;
4using CommunityToolkit.Mvvm.Input;
5using CommunityToolkit.Mvvm.Messaging;
19 protected override async Task OnInitialize()
21 await base.OnInitialize();
23 LocalizationManager.Current.PropertyChanged += this.Localization_Changed;
27 protected override async Task OnDispose()
29 LocalizationManager.Current.PropertyChanged -= this.Localization_Changed;
31 await base.OnDispose();
35 private void Localization_Changed(
object? Sender, PropertyChangedEventArgs e)
37 this.OnPropertyChanged(nameof(this.DetailText));
38 this.OnPropertyChanged(nameof(this.WhatIsX));
46 public double AuthenticationBackgroundSize => 120.0;
51 public double AuthenticationBackgroundCornerRadius => this.AuthenticationBackgroundSize / 2;
55 public double AuthenticationIconSize => 60.0;
60 public bool IsFingerprint => this.biometricMethod is BiometricMethod.Fingerprint or BiometricMethod.TouchId or
BiometricMethod.Unknown;
65 public bool IsFace => this.biometricMethod is BiometricMethod.Face or BiometricMethod.FaceId or
BiometricMethod.Unknown;
70 public string DetailText
75 string methodName = this.biometricMethod
switch
79 _ =>
ServiceRef.
Localizer[nameof(AppResources.BiometricAuthentication)].ToString().ToLower(CultureInfo.CurrentUICulture)
82 return ServiceRef.
Localizer[nameof(AppResources.OnboardingBiometricsPageDetails), methodName];
94 string subject = this.biometricMethod
switch
98 _ =>
ServiceRef.
Localizer[nameof(AppResources.BiometricAuthentication)].ToString().ToLower(CultureInfo.CurrentUICulture)
106 private async Task ShowBiometricsInfo()
108 string message = this.biometricMethod
switch
126 private void Enable()
Base class that references services in the app.
static IUiService UiService
Service serializing and managing UI-related tasks.
static IStringLocalizer Localizer
Localization service
AuthenticationMethod
How the user authenticates itself with the App.
RegistrationStep
The different steps of a TAG Profile registration journey.
BiometricMethod
Enum representing the device biometric method for authentication.
partial class BiometricsViewModel()