Ghost1372

everything can be handy

EyeDropper

Choose a color from anywhere on your screen.

Events

Name
ColorPicked

Methods

Name
Start
Stop

Example

1
2
3
4
5
6
7
8
9
10
11
EyeDropper eyeDropper = new EyeDropper();
eyeDropper.ColorPicked += OnColorPicked;
eyeDropper.Start();

private void OnColorPicked(sender s, Color color)
{
DispatcherQueue.TryEnqueue(() =>
{
myBorder.Background = new SolidColorBrush(color);
});
}

EyeDropper uses a GlobalMouseHook, which operates on a separate thread. Because of this, if you need to update the UI in the ColorPicked event, you must call it from a DispatcherQueue to avoid exceptions.

EyeDropper

Demo

you can run demo and see this feature.

0%