Hi, I have a C# code that runs a time-consuming loop.
Is there a way to read the keyboard (ESC key) and escape from the loop? without the help of an event handler?
I found the following code
if(System.Input.Keyboard.IsKeyDown(Key.Esc))break;
but it seems like it is a function provided by WPF function, which seems a bit tricky to call from within a C# component.
Thanks.