Commit 8c777801 authored by Martin Finkel's avatar Martin Finkel

Fix combobox bug on Xbox/desktop

parent d182461f
......@@ -72,16 +72,12 @@
<winControls:WrapPanel Margin="{StaticResource FrameMarginTop}"
<ComboBox ItemsSource="{Binding LanguageCollection}"
<ComboBox Name="LanguageCombobox"
ItemsSource="{Binding LanguageCollection}"
SelectedItem="{Binding SelectedLanguage, Mode=TwoWay}"
Style="{StaticResource VLCLightComboBox}"
Margin="{StaticResource FrameMarginRight}">
<StackPanel Orientation="Vertical"/>
<TextBlock Text="{Binding Converter={StaticResource LanguageStringifyConverter}}" />
......@@ -15,6 +15,7 @@ using Windows.UI.Xaml.Input;
using Windows.Storage;
using Windows.Foundation.Metadata;
using Windows.UI.ViewManagement;
using Windows.UI.Xaml.Markup;
namespace VLC.UI.Views.SettingsPages
......@@ -74,6 +75,22 @@ namespace VLC.UI.Views.SettingsPages
// workaround for combobox bug
// without this xaml on xbox, the combobox does not scroll properly (too many items?).
// with this xaml on desktop, the first item cannot be selected by mouse/touch (only keyboard)
if (DeviceHelper.GetDeviceType() == DeviceTypeEnum.Xbox)
LanguageCombobox.ItemsPanel = GetItemsPanelTemplate();
private ItemsPanelTemplate GetItemsPanelTemplate()
string xaml = @"<ItemsPanelTemplate xmlns='' xmlns:x=''>
<StackPanel />
return XamlReader.Load(xaml) as ItemsPanelTemplate;
void FocusTextBox_LostFocus(object sender, RoutedEventArgs e)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment