Пример #1
0
        private void SettingsPage_Loaded(object sender, RoutedEventArgs e)
        {
#if STARTS
            if (DeviceHelper.GetDeviceType() != DeviceTypeEnum.Tablet)
            {
                foreach (var element in MusicSettingsPanel.Children)
                {
                    if ((string)((FrameworkElement)element).Tag == "STARTS")
                    {
                        element.Visibility = Visibility.Collapsed;
                    }
                }
                foreach (var element in VideoSettingsPanel.Children)
                {
                    if ((string)((FrameworkElement)element).Tag == "STARTS")
                    {
                        element.Visibility = Visibility.Collapsed;
                    }
                }
            }
#endif
            AppThemeSwitch.Focus(FocusState.Programmatic);

            // 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();
            }
        }
Пример #2
0
 private void SettingsPage_Loaded(object sender, Windows.UI.Xaml.RoutedEventArgs e)
 {
     if (bColorUpdated == true)
     {
         bColorUpdated = false;
         ColorCombo.Focus(FocusState.Programmatic);
     }
     else
     {
         AppThemeSwitch.Focus(FocusState.Programmatic);
     }
 }
        private void SettingsPage_Loaded(object sender, RoutedEventArgs e)
        {
#if STARTS
            if (DeviceHelper.GetDeviceType() != DeviceTypeEnum.Tablet)
            {
                foreach (var element in MusicSettingsPanel.Children)
                {
                    if ((string)((FrameworkElement)element).Tag == "STARTS")
                    {
                        element.Visibility = Visibility.Collapsed;
                    }
                }
                foreach (var element in VideoSettingsPanel.Children)
                {
                    if ((string)((FrameworkElement)element).Tag == "STARTS")
                    {
                        element.Visibility = Visibility.Collapsed;
                    }
                }
            }
#endif
            AppThemeSwitch.Focus(FocusState.Programmatic);
        }