Exemple #1
0
        private async void getPixels(Point location)
        {
            var pixelBuffer = await _bitmap.GetPixelsAsync();

            byte[] pixels = pixelBuffer.ToArray();

            Color color = GetPixelColor(pixels, (int)(location.X * DisplayProperties.LogicalDpi / 96), (int)(location.Y * DisplayProperties.LogicalDpi / 96),
                                        (uint)_bitmap.PixelWidth, (uint)_bitmap.PixelHeight);

            SControl.setCurrentColor(color);
            _color = color;
            //SControl.Background = new SolidColorBrush(color);
        }