private void _rootGrid_PointerReleased(object sender, PointerRoutedEventArgs e) { var pointer = e.Pointer; if (pointer.PointerId == _pointerId) { var point = e.GetCurrentPoint(_rootGrid); UpdateEyedropper(point.Position); PickEnded?.Invoke(this, EventArgs.Empty); _pointerId = 0; _taskSource.SetResult(Color); } }
private async void TargetGrid_PointerReleased(object sender, PointerRoutedEventArgs e) { var pointer = e.Pointer; if (pointer.PointerId == _pointerId) { var point = e.GetCurrentPoint(_rootGrid); if (_appScreenshot == null) { await UpdateAppScreenshotAsync(); } UpdateEyedropper(point.Position); PickEnded?.Invoke(this, EventArgs.Empty); _pointerId = 0; if (!_taskSource.Task.IsCanceled) { _taskSource.SetResult(Color); } } }
private void Eyedropper_PickEnded(Eyedropper sender, EventArgs args) { EyedropperEnabled = false; PickEnded?.Invoke(this, args); }