/// <summary>Initializes a new instance of the <see cref="LanguageSelector"/> class.</summary> public LanguageSelector() { this.Languages = new ObservableCollection <Language>(); CultureChangedEventManager.UpdateHandler((_, x) => this.SetCurrentValue( SelectedLanguageProperty, this.Languages.FirstOrDefault(l => Gu.Localization.Culture.NameEquals(Translator.CurrentCulture, l.Culture)))); }
/// <summary>Initializes a new instance of the <see cref="Language"/> class.</summary> /// <param name="culture">The culture.</param> public Language(CultureInfo? culture = null) { this.culture = culture; CultureChangedEventManager.UpdateHandler((_, x) => this.OnPropertyChanged(nameof(this.IsSelected))); }
/// <summary> Initializes a new instance of the <see cref="Language"/> class.</summary> public Language() { CultureChangedEventManager.UpdateHandler((_, x) => this.IsSelected = Gu.Localization.Culture.NameEquals(Translator.CurrentCulture, this.Culture)); }