Beispiel #1
0
        /// <summary>
        /// When the dial is turned.
        /// </summary>
        private void RadialController_RotationChanged(RadialController sender,
                                                      RadialControllerRotationChangedEventArgs args)
        {
            if (!string.IsNullOrEmpty(_selectedControl) && CanvasControl.ReadyToDraw)
            {
                // Check to see if the dial is pressed during rotation.
                var increment = CalculateIncrements(args);

                switch (_selectedControl)
                {
                case "Contrast":
                    Contrast = +increment;
                    break;

                case "Saturation":
                    Saturation = +increment;
                    break;

                case "Exposure":
                    Exposure = +increment;
                    break;

                case "Blur":
                    Blur = +increment * 10;
                    break;
                }

                CreateEffects();
            }
        }
Beispiel #2
0
 // Dial rotation handler
 private void Controller_RotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
 {
     if (IsActive)
     {
         Rotate(args.RotationDeltaInDegrees);
     }
 }
Beispiel #3
0
        private void ControllerRotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
        {
            switch (_currentTool)
            {
            case CurrentTool.Bright:
                Rotate.Angle += args.RotationDeltaInDegrees;
                var brightness = ((int)(Rotate.Angle / 10)).ToHueBrightness();
                colourShower.SetBrightness(brightness);
                break;

            case CurrentTool.Color:

                _selBrush += (int)(args.RotationDeltaInDegrees / 10);
                //if (_selBrush >= _namedBrushes.Count)
                //    _selBrush = 0;
                //if (_selBrush < 0)
                //    _selBrush = _namedBrushes.Count - 1;

                var newColour   = _selBrush.ToHueColour();
                var newRGBColor = newColour.ToRGBColour();
                Rectangle.Fill = new SolidColorBrush(new Color()
                {
                    R = (byte)(newRGBColor.R * 255), G = (byte)(newRGBColor.G * 255), B = (byte)(newRGBColor.B * 255)
                });

                colourShower.ShowColour(newColour);
                break;

            default:
                break;
            }
        }
Beispiel #4
0
        private void RadialController_RotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
        {
            switch (thisTool)
            {
            case CurrentTool.BrightnessItem:
                double tempBrightnessValue = brightnessValue;
                tempBrightnessValue += args.RotationDeltaInDegrees / 36 * 10;
                if (!(tempBrightnessValue < 0) && !(tempBrightnessValue > 100))
                {
                    brightnessValue += args.RotationDeltaInDegrees / 36 * 10;

                    string msg = String.Format("Brightness: {0}%", brightnessValue);
                    ShowSlideText.Text = msg;

                    BrightnessSlide.Value = brightnessValue;

                    brightnessChange(Math.Round(brightnessValue).ToString());
                }
                else if (tempBrightnessValue < 0)
                {
                    toggleLight(0);
                }
                break;
            }
        }
Beispiel #5
0
        private void Controller_RotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
        {
            log.Text += "\nRotation Changed Delta = " + args.RotationDeltaInDegrees;
            LogContactInfo(args.Contact);

            sliders[activeItemIndex].Value += args.RotationDeltaInDegrees;
        }
Beispiel #6
0
        // Begin "Step 6: Customize the device haptics"
        //private void RadialController_ControlAcquired(
        //    RadialController rc_sender,
        //    RadialControllerControlAcquiredEventArgs args)
        //{
        //    // Turn off default haptic feedback.
        //    radialController.UseAutomaticHapticFeedback = false;

        //    SimpleHapticsController hapticsController =
        //        args.SimpleHapticsController;

        //    // Enumerate haptic support.
        //    IReadOnlyCollection<SimpleHapticsControllerFeedback> supportedFeedback =
        //        hapticsController.SupportedFeedback;

        //    foreach (SimpleHapticsControllerFeedback feedback in supportedFeedback)
        //    {
        //        if (feedback.Waveform == KnownSimpleHapticsControllerWaveforms.BuzzContinuous)
        //        {
        //            CBBuzzContinuous.IsEnabled = true;
        //            CBBuzzContinuous.IsChecked = true;
        //        }
        //        else if (feedback.Waveform == KnownSimpleHapticsControllerWaveforms.Click)
        //        {
        //            CBClick.IsEnabled = true;
        //            CBClick.IsChecked = true;
        //        }
        //        else if (feedback.Waveform == KnownSimpleHapticsControllerWaveforms.Press)
        //        {
        //            CBPress.IsEnabled = true;
        //            CBPress.IsChecked = true;
        //        }
        //        else if (feedback.Waveform == KnownSimpleHapticsControllerWaveforms.Release)
        //        {
        //            CBRelease.IsEnabled = true;
        //            CBRelease.IsChecked = true;
        //        }
        //        else if (feedback.Waveform == KnownSimpleHapticsControllerWaveforms.RumbleContinuous)
        //        {
        //            CBRumbleContinuous.IsEnabled = true;
        //            CBRumbleContinuous.IsChecked = true;
        //        }
        //    }

        //    if (hapticsController?.IsIntensitySupported == true)
        //    {
        //        CBIntensity.IsEnabled = true;
        //        CBIntensity.IsChecked = true;
        //    }
        //    if (hapticsController?.IsPlayCountSupported == true)
        //    {
        //        CBPlayCount.IsEnabled = true;
        //        CBPlayCount.IsChecked = true;
        //    }
        //    if (hapticsController?.IsPlayDurationSupported == true)
        //    {
        //        CBPlayDuration.IsEnabled = true;
        //        CBPlayDuration.IsChecked = true;
        //    }
        //    if (hapticsController?.IsReplayPauseIntervalSupported == true)
        //    {
        //        CBReplayPauseInterval.IsEnabled = true;
        //        CBReplayPauseInterval.IsChecked = true;
        //    }
        //}
        // End "Step 6: Customize the device haptics"

        // Connect wheel device rotation to slider control.
        private void RadialController_RotationChanged(
            object sender, RadialControllerRotationChangedEventArgs args)
        {
            if (RotationSlider.Value + args.RotationDeltaInDegrees >= RotationSlider.Maximum)
            {
                RotationSlider.Value = RotationSlider.Maximum;
            }
            else if (RotationSlider.Value + args.RotationDeltaInDegrees < RotationSlider.Minimum)
            {
                RotationSlider.Value = RotationSlider.Minimum;
            }
            else
            {
                RotationSlider.Value += args.RotationDeltaInDegrees;
            }

            // Begin "Step 6: Customize the device haptics"
            //if (ClickToggle.IsOn &&
            //    (RotationSlider.Value > RotationSlider.Minimum) &&
            //    (RotationSlider.Value < RotationSlider.Maximum))
            //{
            //    SimpleHapticsControllerFeedback waveform =
            //        FindWaveform(args.SimpleHapticsController,
            //        KnownSimpleHapticsControllerWaveforms.BuzzContinuous);
            //    if (waveform != null)
            //    {
            //        args.SimpleHapticsController.SendHapticFeedback(waveform);
            //    }
            //}
            // End "Step 6: Customize the device haptics"
        }
Beispiel #7
0
        private void OnRotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
        {
            var evt = new DialEventArgs();
            RotationDirection             direction   = args.RotationDeltaInDegrees > 0 ? RotationDirection.Right : RotationDirection.Left;
            IEnumerable <IDialController> controllers = GetApplicableControllers().Where(c => c.CanHandleRotate);

            foreach (IDialController controller in controllers)
            {
                try
                {
                    controller.OnRotate(direction, evt);

                    if (evt.Handled)
                    {
                        if (!string.IsNullOrEmpty(evt.Action))
                        {
                            VsHelpers.WriteStatus(evt.Action);
                        }

                        break;
                    }
                }
                catch (Exception ex)
                {
                    Logger.Log(ex);
                }
            }
        }
Beispiel #8
0
 private void RadialController_RotationChanged(RadialController sender,
                                               RadialControllerRotationChangedEventArgs args)
 {
     if (CurrentSelection == ColoringBookRadialController.Color)
     {
         if (args.RotationDeltaInDegrees > 0)
         {
             ColorPaletteViewModel.SelectNextItem();
         }
         else
         {
             ColorPaletteViewModel.SelectPreviousItem();
         }
     }
     else if (CurrentSelection == ColoringBookRadialController.UndoRedo)
     {
         if (args.RotationDeltaInDegrees > 0)
         {
             RedoOperation?.Invoke(this, EventArgs.Empty);
         }
         else
         {
             UndoOperation?.Invoke(this, EventArgs.Empty);
         }
     }
 }
        /// <summary>
        /// Calculate the increments based on delta and if the movement is normal or precise
        /// </summary>
        /// <param name="args"></param>
        /// <returns></returns>
        private static float CalculateIncrements(RadialControllerRotationChangedEventArgs args)
        {
            float variance;

            if (Math.Abs(args.RotationDeltaInDegrees) == _normalMovement)
            {
                if (args.RotationDeltaInDegrees < 0)
                {
                    variance = -0.1f;
                }
                else
                {
                    variance = 0.1f;
                }
            }
            else
            {
                if (args.RotationDeltaInDegrees < 0)
                {
                    variance = -0.01f;
                }
                else
                {
                    variance = 0.01f;
                }
            }

            return(variance);
        }
Beispiel #10
0
        /// <summary>
        /// This function gets called every time there is a rotational change on the connected Surface Dial while a Surface Dial enabled TextBox is in focus.
        /// This function ensures that the TextBox stays within the set range between MinValue and MaxValue while rotating the Surface Dial.
        /// It defaults the content of the TextBox to 0.0 if a non-numerical value is detected.
        /// </summary>
        /// <param name="sender">The RadialController being used.</param>
        /// <param name="args">The arguments of the changed event.</param>
        private static void Controller_RotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
        {
            if (_textBox == null)
            {
                return;
            }

            string t = _textBox.Text;
            double nr;

            if (double.TryParse(t, out nr))
            {
                nr += args.RotationDeltaInDegrees * GetStepValue(_textBox);
                if (GetEnableMinMaxValue(_textBox))
                {
                    if (nr < GetMinValue(_textBox))
                    {
                        nr = GetMinValue(_textBox);
                    }

                    if (nr > GetMaxValue(_textBox))
                    {
                        nr = GetMaxValue(_textBox);
                    }
                }
            }
            else
            {
                // default to zero if content is not a number
                nr = 0.0d;
            }

            _textBox.Text = nr.ToString("0.00");
        }
 private void RadialController_RotationChanged(RadialController sender,
                                               RadialControllerRotationChangedEventArgs args)
 {
     RadioButton[] inkingTools   = { FillCellButton, PenButton, PencilButton, EraserButton };
     Action[]      inkingActions =
     {
         OnFillCellButtonClicked,
         OnPenButtonClicked,
         OnPencilButtonClicked,
         OnEraserButtonClicked
     };
     if (CurrentRadialSelection == ColoringBookRadialController.InkingTool)
     {
         SelectedToolIndex = (4 + SelectedToolIndex +
                              (args.RotationDeltaInDegrees > 0 ? 1 : -1)) % 4;
         inkingActions[SelectedToolIndex]();
         inkingTools[SelectedToolIndex].IsChecked = true;
         inkingTools[SelectedToolIndex].Focus(FocusState.Keyboard);
     }
     else if (CurrentRadialSelection == ColoringBookRadialController.StrokeSize)
     {
         if (SelectedToolIndex == 1 || SelectedToolIndex == 2)
         {
             var flyout = FlyoutBase.GetAttachedFlyout(inkingTools[SelectedToolIndex]);
             flyout.ShowAt(inkingTools[SelectedToolIndex] as FrameworkElement);
             Slider slider = (SelectedToolIndex == 1) ?
                             PenStrokeWidthSlider : PencilStrokeWidthSlider;
             slider.Focus(FocusState.Keyboard);
             int val    = (int)args.RotationDeltaInDegrees;
             int newVal = ((int)slider.Value) + (val > 0 ? 1 : -1);
             newVal       = (newVal > 24) ? 24 : newVal;
             newVal       = (newVal < 0) ? 0 : newVal;
             slider.Value = newVal;
         }
     }
     else if (CurrentRadialSelection == ColoringBookRadialController.StrokeSizeDialClick)
     {
         Slider slider = (SelectedToolIndex == 1) ? PenStrokeWidthSlider : PencilStrokeWidthSlider;
         slider.Focus(FocusState.Keyboard);
         int val    = (int)args.RotationDeltaInDegrees;
         int newVal = ((int)slider.Value) + (val > 0 ? 1 : -1);
         newVal       = (newVal > 24) ? 24 : newVal;
         newVal       = (newVal < 0) ? 0 : newVal;
         slider.Value = newVal;
     }
     else if (CurrentRadialSelection == ColoringBookRadialController.EraserTool)
     {
         if ((args.RotationDeltaInDegrees > 0) && (DrawingTool == DrawingTool.Eraser))
         {
             EraserFlyoutList.SelectedIndex = 1;
             CellEraseListItem.Focus(FocusState.Keyboard);
         }
         else if ((args.RotationDeltaInDegrees < 0) && (DrawingTool == DrawingTool.EraseCell))
         {
             EraserFlyoutList.SelectedIndex = 0;
             StrokeEraseListItem.Focus(FocusState.Keyboard);
         }
     }
 }
Beispiel #12
0
        private static void Controller_RotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
        {
            if (_control == null)
            {
                return;
            }

            _control.Value += args.RotationDeltaInDegrees * GetStepValue(_control) / 5;
        }
 /// <summary>
 /// When the dial is turned.
 /// </summary>
 private void RadialController_RotationChanged(RadialController sender,
                                               RadialControllerRotationChangedEventArgs args)
 {
     if (!string.IsNullOrEmpty(_selectedControl) && CanvasControl.ReadyToDraw)
     {
         // Check to see if the dial is pressed during rotation.
         var increment = CalculateIncrements(args);
         IncrementValue(increment);
     }
 }
        private void Controller_RotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
        {
            log.Text += "\nRotation Changed Delta = " + args.RotationDeltaInDegrees;
            if (args.Contact != null)
            {
                log.Text += "\nBounds = " + args.Contact.Bounds.ToString();
                log.Text += "\nPosition = " + args.Contact.Position.ToString();
            }

            Slider1.Value += args.RotationDeltaInDegrees;
        }
 private void OnRadialController_RotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
 {
     if (args.RotationDeltaInDegrees > 0)
     {
         Next();
     }
     else
     {
         Previous();
     }
 }
        private void Controller_RotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
        {
            log.Text += "\nRotation Changed Delta = " + args.RotationDeltaInDegrees;
            if (args.Contact != null)
            {
                log.Text += "\nBounds = " + args.Contact.Bounds.ToString();
                log.Text += "\nPosition = " + args.Contact.Position.ToString();
            }

            slider1.Value += args.RotationDeltaInDegrees;
        }
Beispiel #17
0
 private void OnRotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
 {
     if (args.RotationDeltaInDegrees > 0)
     {
         _dte.Application.Debugger.StepOver();
     }
     else
     {
         _dte.Application.Debugger.StepInto();
     }
 }
Beispiel #18
0
 private async void ControllerRotationChangedAsync(RadialController sender, RadialControllerRotationChangedEventArgs args)
 {
     Debug.WriteLine($"{args.RotationDeltaInDegrees}");
     if (_controllerMode == ControllerMode.zoom)
     {
         mapControl.ZoomLevel = mapControl.ZoomLevel + args.RotationDeltaInDegrees;
     }
     else
     {
         await mapControl.TryRotateAsync(args.RotationDeltaInDegrees);
     }
 }
Beispiel #19
0
 private void MyController_RotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
 {
     //In Playback mode, scrub through the video
     if (myController.Menu.GetSelectedMenuItem().Equals(playbackItem))
     {
         myPlayer.Position = myPlayer.Position + TimeSpan.FromSeconds(args.RotationDeltaInDegrees);
     }
     //In Volume mode, change the players volume
     else
     {
         myPlayer.Volume += args.RotationDeltaInDegrees / 100;
     }
 }
Beispiel #20
0
        private void RadialController_RotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
        {
            //Console.WriteLine("rotation changed: " + args.RotationDeltaInDegrees);
            Invoke(new Action(() => {
                var timestamp = DateTime.Now.ToLongTimeString();
                this.labelRadialOutput.Text = string.Format("[{0}] rotation changed: {1}", timestamp, args.RotationDeltaInDegrees);

                var data              = new Dictionary <string, object>();
                data["event_id"]      = EventId_RotationChanged;
                data["delta_degrees"] = args.RotationDeltaInDegrees;
                localUdpClient.Send(data);
            }));
        }
Beispiel #21
0
 private void Controller_RotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
 {
     if (currentDialItem == "Opacity")
     {
         SliderOpacity.Value += args.RotationDeltaInDegrees;
         ImageControl.Opacity = SliderOpacity.Value / 100;
     }
     else
     {
         SliderBlur.Value += args.RotationDeltaInDegrees;
         double blur = SliderBlur.Value / 100;
     }
 }
        private void MyController_RotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
        {
            //If an item is already selected, manipulate the slider unless the user is performing a press-and-rotate
            //if (selectedItem != null)
            if (selectedItem != null && args.IsButtonPressed == false)
            {
                //Change the value on the slider
                selectedItem.Value += args.RotationDeltaInDegrees;

                //If the new value is a multiple of 16, fire haptics

                if (selectedItem.Value % 16 == 0 || selectedItem.Value == 255)
                {
                    SendHapticFeedback(args.SimpleHapticsController);
                }
            }
            else if (args.RotationDeltaInDegrees > 0)
            {
                //Rotation is to the right, change the highlighted item accordingly
                selectedItem = null;
                if (highlightedItem == RValue)
                {
                    UpdateHighlight(GValue);
                }
                else if (highlightedItem == GValue)
                {
                    UpdateHighlight(BValue);
                }
                else if (highlightedItem == BValue)
                {
                    UpdateHighlight(Preview);
                }
            }
            else if (args.RotationDeltaInDegrees < 0)
            {
                selectedItem = null;
                //Rotation is to the left, change the highlighted item accordingly
                if (highlightedItem == GValue)
                {
                    UpdateHighlight(RValue);
                }
                else if (highlightedItem == BValue)
                {
                    UpdateHighlight(GValue);
                }
                else if (highlightedItem == Preview)
                {
                    UpdateHighlight(BValue);
                }
            }
        }
Beispiel #23
0
 private void ControllerRotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
 {
     if (RotationSlider.Value + args.RotationDeltaInDegrees > 100)
     {
         RotationSlider.Value = 100;
         return;
     }
     if (RotationSlider.Value + args.RotationDeltaInDegrees < 0)
     {
         RotationSlider.Value = 0;
         return;
     }
     RotationSlider.Value += args.RotationDeltaInDegrees;
 }
Beispiel #24
0
 private void MyController_RotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
 {
     if (Math.Abs(args.RotationDeltaInDegrees) >= 10)
     {
         bool isUp = args.RotationDeltaInDegrees < 0;
         if (isUp)
         {
             Game.Player.Climb(ClimbingDirection.Up);
         }
         else
         {
             Game.Player.Climb(ClimbingDirection.Down);
         }
     }
 }
 private void controller_RotationChanged(object sender, RadialControllerRotationChangedEventArgs args)
 {
     // At 1 degree this event may fire more than the frame rate
     // so we need to add up the rotation deltas
     if (m_rotationChangedEventFired)
     {
         // Add the rotation, and copy the latest contact information
         m_rotationChangedEventArgs.RotationDeltaInDegrees += args.RotationDeltaInDegrees;
         m_rotationChangedEventArgs.Contact = args.Contact;
     }
     else
     {
         m_rotationChangedEventArgs  = args;
         m_rotationChangedEventFired = true;
     }
 }
        private async void _radialController_RotationChanged(RadialController sender,
                                                             RadialControllerRotationChangedEventArgs args)
        {
            if (args.RotationDeltaInDegrees > 0)
            {
                _currentEffect.IncreaseEffect();
            }
            else
            {
                _currentEffect.DecreaseEffect();
            }

            EffectValue.Text = _currentEffect.Value;

            await RenderAsync();
        }
        // <SnippetRotationChangedHandler>
        // Occurs when the wheel device is rotated while a custom
        // RadialController tool is active.
        // NOTE: Your app does not receive this event when the RadialController
        // menu is active or a built-in tool is active
        // Send rotation input to slider of active region.
        private void RadialController_RotationChanged(RadialController sender,
                                                      RadialControllerRotationChangedEventArgs args)
        {
            Slider slider = sliders[activeMenuItemIndex];

            if (slider.Value + args.RotationDeltaInDegrees > 100)
            {
                slider.Value = 100;
                return;
            }
            else if (slider.Value + args.RotationDeltaInDegrees < 0)
            {
                slider.Value = 0;
                return;
            }
            slider.Value += args.RotationDeltaInDegrees;
            AddToLog("\nRotation: " + sliders[activeMenuItemIndex].Name + " value changed to " + slider.Value);
        }
Beispiel #28
0
        private void DialController_RotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
        {
            if (args == null)
            {
                return;
            }

            // Make sure we're still in range of the effect's property that we're changing
            if (SelectedEffectSlider.Value < PageViewModel.SelectedEffect.MinPropertyValue ||
                SelectedEffectSlider.Value > PageViewModel.SelectedEffect.MaxPropertyValue)
            {
                return;
            }

            SelectedEffectSlider.Value += args.RotationDeltaInDegrees / 100;

            UpdateEffect();
        }
Beispiel #29
0
        private void OnRotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
        {
            if (args.RotationDeltaInDegrees > 0)
            {
                Log.dl("Clockwise");

                _dte.Application.Debugger.StepInto();

                //ShowToast("LoboDialDebug", "Step Into");
            }
            else
            {
                Log.dl("CounterClockwise");

                _dte.Application.Debugger.StepOver();

                //ShowToast("LoboDialDebug", "Step Over");
            }
        }
Beispiel #30
0
 private async void MyController_RotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
 {
     if (null != dialControl)
     {
         await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
         {
             dialControl.Rotation += args.RotationDeltaInDegrees;
             if (dialControl.Rotation > 0)
             {
                 dialControl.Rotation = 0;
             }
             else if (dialControl.Rotation < -315)
             {
                 dialControl.Rotation = -315;
             }
             MainGrid.Background = dialControl.ColorBrush;
         });
     }
 }
Beispiel #31
0
 private void MyController_RotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
 {
     if (sender.Menu.GetSelectedMenuItem().DisplayText == "Brightness")
     {
         VM.Brightness = Math.Max(0, Math.Min(100, VM.Brightness + args.RotationDeltaInDegrees));
         if (VM.Brightness == 100 && args.RotationDeltaInDegrees > 0 ||
             VM.Brightness == 0 && args.RotationDeltaInDegrees < 0)
         {
             if (supportsHaptics)
             {
                 args.SimpleHapticsController.SendHapticFeedback(args.SimpleHapticsController.SupportedFeedback.First());
             }
         }
     }
     else if (sender.Menu.GetSelectedMenuItem().DisplayText == "Saturation")
     {
         VM.Saturation = Math.Max(0, Math.Min(1, VM.Saturation + args.RotationDeltaInDegrees / 100));
         if (VM.Saturation == 1 && args.RotationDeltaInDegrees > 0 ||
             VM.Saturation == 0 && args.RotationDeltaInDegrees < 0)
         {
             if (supportsHaptics)
             {
                 args.SimpleHapticsController.SendHapticFeedback(args.SimpleHapticsController.SupportedFeedback.First());
             }
         }
     }
     else if (sender.Menu.GetSelectedMenuItem().DisplayText == "Hue")
     {
         var hue = Math.Floor((VM.Hue + args.RotationDeltaInDegrees)) % 360;
         if (hue < 0)
         {
             hue = 360 + hue;
         }
         VM.Hue = hue;
         if (hue % 60 == 0)
         {
             if (supportsHaptics)
             {
                 args.SimpleHapticsController.SendHapticFeedback(args.SimpleHapticsController.SupportedFeedback.First());
             }
         }
     }
 }
 private void RadialController_RotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
 {
     Rotation(args.RotationDeltaInDegrees);
 }
        private void Controller_RotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
        {
            log.Text += "\nRotation Changed Delta = " + args.RotationDeltaInDegrees;
            LogContactInfo(args.Contact);

            sliders[activeItemIndex].Value += args.RotationDeltaInDegrees;
        }