Ejemplo n.º 1
0
        private void DeviceCarousel_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            Models.Thermostat target = DeviceCarousel.SelectedItem as Models.Thermostat;
            if (null == target)
            {
                return;
            }

            for (int i = 0; i < ViewModel.DeviceList.Count; ++i)
            {
                ViewModel.DeviceList[i].DeviceBrush     = (target == ViewModel.DeviceList[i]) ? new SolidColorBrush(Colors.White) : new SolidColorBrush(Color.FromArgb(0xff, 0x87, 0x87, 0x87));
                ViewModel.DeviceList[i].DeviceBallBrush = (target == ViewModel.DeviceList[i]) ? new SolidColorBrush(Colors.White) : new SolidColorBrush(Colors.Transparent);

                ViewModel.DeviceList[i].DevicePrevBallBrush = (target == ViewModel.DeviceList[i] && 0 < i && 1 < ViewModel.DeviceList.Count) ?
                                                              new SolidColorBrush(Color.FromArgb(0xff, 0x87, 0x87, 0x87)) : new SolidColorBrush(Colors.Transparent);

                ViewModel.DeviceList[i].DeviceNextBallBrush = (target == ViewModel.DeviceList[i] && (i + 1) < ViewModel.DeviceList.Count) ?
                                                              new SolidColorBrush(Color.FromArgb(0xff, 0x87, 0x87, 0x87)) : new SolidColorBrush(Colors.Transparent);
            }

            FlipView.Visibility = (target.is_online) ? Visibility.Visible : Visibility.Collapsed;
            offline.Visibility  = (false == target.is_online) ? Visibility.Visible : Visibility.Collapsed;
            hDown.Visibility    = (target.is_online) ? Visibility.Visible : Visibility.Collapsed;
            hUp.Visibility      = (target.is_online) ? Visibility.Visible : Visibility.Collapsed;
            //tSlider.Visibility = (target.is_online) ? Visibility.Visible : Visibility.Collapsed;

            FlipView.Focus(FocusState.Pointer);
        }
 protected void PagingIndicator_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     // Make sure that the navigation buttons are updated by forcing focus to the FlipView
     NavFlipView.Focus(Windows.UI.Xaml.FocusState.Pointer);
 }
Ejemplo n.º 3
0
        private void flipView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            FlipView fv = sender as FlipView;

            fv.Focus(FocusState.Pointer);
        }