public void Init() { var enabledFs = new FormattedString(); var statusSpan = new Span { Text = string.Concat(AppResources.Status, " ") }; enabledFs.Spans.Add(statusSpan); enabledFs.Spans.Add(new Span { Text = AppResources.Enabled, ForegroundColor = Color.Green, FontAttributes = FontAttributes.Bold, FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)) }); var statusEnabledLabel = new Label { FormattedText = enabledFs, HorizontalTextAlignment = TextAlignment.Center, LineBreakMode = LineBreakMode.WordWrap, FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)), TextColor = Color.Black, VerticalOptions = LayoutOptions.CenterAndExpand }; var disabledFs = new FormattedString(); disabledFs.Spans.Add(statusSpan); disabledFs.Spans.Add(new Span { Text = AppResources.Disabled, ForegroundColor = Color.FromHex("c62929"), FontAttributes = FontAttributes.Bold, FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)) }); var statusDisabledLabel = new Label { FormattedText = disabledFs, HorizontalTextAlignment = TextAlignment.Center, LineBreakMode = LineBreakMode.WordWrap, FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)), TextColor = Color.Black }; var enableImage = new CachedImage { Source = "autofill_enable.png", HorizontalOptions = LayoutOptions.Center, VerticalOptions = LayoutOptions.CenterAndExpand, WidthRequest = 300, HeightRequest = 118 }; var useImage = new CachedImage { Source = "autofill_use.png", HorizontalOptions = LayoutOptions.Center, VerticalOptions = LayoutOptions.CenterAndExpand, WidthRequest = 300, HeightRequest = 128 }; var goButton = new ExtendedButton { Text = AppResources.BitwardenAutofillServiceOpenAutofillSettings, Command = new Command(() => { _googleAnalyticsService.TrackAppEvent("OpenAutofillSettings"); _deviceActionService.OpenAutofillSettings(); }), VerticalOptions = LayoutOptions.End, HorizontalOptions = LayoutOptions.Fill, Style = (Style)Application.Current.Resources["btn-primary"] }; DisabledStackLayout = new StackLayout { Children = { BuildServiceLabel(), statusDisabledLabel, enableImage, goButton, BuildAccessibilityButton() }, Orientation = StackOrientation.Vertical, Spacing = 20, Padding = new Thickness(20, 30), VerticalOptions = LayoutOptions.FillAndExpand }; EnabledStackLayout = new StackLayout { Children = { BuildServiceLabel(), statusEnabledLabel, useImage, BuildAccessibilityButton() }, Orientation = StackOrientation.Vertical, Spacing = 20, Padding = new Thickness(20, 30), VerticalOptions = LayoutOptions.FillAndExpand }; ScrollView = new ScrollView { Content = DisabledStackLayout }; Title = AppResources.AutofillService; Content = ScrollView; }