Search found 4 matches
- 07 Apr 2019, 17:01
- Forum: General Discussion
- Replies: 2
- Views: 1034
Re: Getting mouse position in MouseDown event
I think I found the culprit. In the version that binds the event from ConnectEvent, the handling function is marked as async, and I was doing something similar to: async void OnMouseDownMyUserControl(object sender, MouseButtonEventArgs args) { await doSomeAsyncStuff(); var _offset = args.GetPosition...
- 07 Apr 2019, 03:18
- Forum: General Discussion
- Replies: 2
- Views: 1034
Getting mouse position in MouseDown event
Hi, I have a very simple UserControl on which I apply MouseDown="OnMouseDownMyUserControl" in the XAML, and in the ConnectEvent of my root code-behind: if (eventName == "MouseDown" && handlerName == "OnMouseDownMyUserControl"){ ((MyUserControl)source).MouseDown ...
- 05 Apr 2019, 01:36
- Forum: General Discussion
- Replies: 3
- Views: 1050
Re: Global Keyboard handling
Yes sir, works perfectly! Thanks for the code snippet, much appreciated :)Do you think that could work for you?
- 04 Apr 2019, 16:21
- Forum: General Discussion
- Replies: 3
- Views: 1050
Global Keyboard handling
Hi, How can I handle keyboard events globally, without needed a specific element to be focused? My root element is currently a Page, and it contains a Grid; both have a Background defined. However I cannot seem to receive the KeyDown/KeyUp events on those (either when using a KeyUp definition in the...