/// <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))));
 }
Ejemplo n.º 2
0
 /// <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)));
 }
Ejemplo n.º 3
0
 /// <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));
 }