I am trying to develop a Windows application that allows people to "draw on their screen."
Iām developing with:
.NET 3.5 C#/WPF
I have a WPF Window that hosts an InkCanvas, both having transparent backgrounds.
Window XAML properties:
ShowInTaskbar="True" ResizeMode="NoResize" Background="Transparent"
WindowStyle="None" AllowsTransparency="True" Topmost="True"
InkCanvas properties:
Background="#11FFFFFF"
I need an event handler for the following: - right click anywhere in window - press escape
desired result: - WPF window remains on top of all other windows, but is no longer active and no longer accepts input - WPF window can longer be focused on. All input from the users should go to their current focused window and ignore the wpf window with the inkcanvas that is on top of everything
Basic usage example: A user of the app is playing a game. They stop and draw some arrows in the wpf window / inkcanvas. They finish by pressing escape. The wpf window remains on top, with the shapes the user drew open, and the user's input returns to whatever window they have open/focused.
So far, I've tried this:
MouseRightButtonUp ::
mywindow.isenabled = false
and I've tried:
mywindow.IsInputMethodEnabled = false
Not working so far, the wpf window still starts grabbing user input. I somehow need to make this window as showing but without it being activated .. even after it has been "used" for some period of time.
Thank you in advance for any advice!