Beispiel #1
0
        private void ZoomModeComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (Control1 != null && ZoomSlider != null)
            {
                if (sender is ComboBox cb)
                {
                    switch (cb.SelectedIndex)
                    {
                    case 0:     // Enabled
                        Control1.ZoomMode    = ZoomMode.Enabled;
                        ZoomSlider.IsEnabled = true;
                        break;

                    case 1:     // Disabled
                        Control1.ZoomMode = ZoomMode.Disabled;
                        Control1.ChangeView(null, null, (float)1.0);
                        ZoomSlider.Value     = 1;
                        ZoomSlider.IsEnabled = false;
                        break;

                    default:     // Enabled
                        Control1.ZoomMode    = ZoomMode.Enabled;
                        ZoomSlider.IsEnabled = true;
                        break;
                    }
                }
            }
        }
Beispiel #2
0
 private void ZoomSlider_ValueChanged(object sender, RangeBaseValueChangedEventArgs e)
 {
     if (Control1 != null)
     {
         Control1.ChangeView(null, null, (float)e.NewValue);
     }
 }
Beispiel #3
0
 private void Control1_KeyDown(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.KeyEventArgs e)
 {
     if (e.VirtualKey == Windows.System.VirtualKey.Up)
     {
         tag++;
         Control1.ChangeView(null, null, tag);
     }
     if (e.VirtualKey == Windows.System.VirtualKey.Down)
     {
         tag--;
         Control1.ChangeView(null, null, tag);
     }
 }
Beispiel #4
0
 private void Control1_KeyDown(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Up)
     {
         tag++;
         Control1.ChangeView(null, null, tag);
     }
     if (e.Key == Windows.System.VirtualKey.Down)
     {
         tag--;
         Control1.ChangeView(null, null, tag);
     }
 }