mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 12:46:47 +02:00
[TextExtractor] Extend settings with preferred language (#22901)
* [TextExtractor] Extend settings with preferred language * TextExtractor simplifying code, adding update languages on dropdown opening * fix typo * TextExtractor fixing bug with order of languages
This commit is contained in:
@@ -23,5 +23,21 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
DataContext = ViewModel;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void TextExtractor_ComboBox_Loaded(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
|
||||
{
|
||||
/**
|
||||
* UWP hack
|
||||
* because UWP load the bound ItemSource of the ComboBox asynchronous,
|
||||
* so after InitializeComponent() the ItemSource is still empty and can't automatically select a entry.
|
||||
* Selection via SelectedItem and SelectedValue is still not working too
|
||||
*/
|
||||
ViewModel.UpdateLanguages();
|
||||
}
|
||||
|
||||
private void TextExtractor_ComboBox_DropDownOpened(object sender, object e)
|
||||
{
|
||||
ViewModel.UpdateLanguages();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user