private void Rotary_Rotated(IRotaryEncoder sender, RotaryEncoderRotatedEventArgs args) { Dispatcher.Run(() => { AddOutput(string.Format("Rotary rotated {0}", args.Direction)); }); }
void EncoderOnRotated(IRotaryEncoder sender, RotaryEncoderRotatedEventArgs args) { if (args.Direction == RotationDirection.Clockwise) { _counter++; } else { _counter--; } Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => EncoderValue.Text = _counter.ToString()); }