Universal Windows Platform (UWP)
A Microsoft platform for building and publishing apps for Windows desktop devices.
2,522 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am wondering why action "OnKeyDown" is not working properly.
When I use this class the calculations of my program goes wierd with "NaN" besides a concrete number.
How to make any key down calculate price?
Could you mind share your code that you have used for listen OnKeyDown action?
@Nico Zhu (Shanghai Wicresoft Co,.Ltd.)
During the testing, if the control has been focused, KeyDown will be invoked, please check if it was focused before press keyboard.
@Nico Zhu (Shanghai Wicresoft Co,.Ltd.)
Can you elaborate? I am a beginner, what do you mean by that?
@Nico Zhu (Shanghai Wicresoft Co,.Ltd.)
Do you mean System.Boolean IsFocusedEngaged?
It can't be triggered, even if I trigger it my app crashes.
Ok, could tell which control
KeyDown
event that you want listen? could you share your xaml code ?@Nico Zhu (Shanghai Wicresoft Co,.Ltd.)
not much to be honest, should I have something there?
If I check "IsFocusEngaged" it deslects back but it puts code inside xaml object, andy my app crashes with it.
KeyDown="test"
could be triggered when the cursor flash in the box.no, my cursor hoover over the box when typing and still not working... :/
@Nico Zhu (Shanghai Wicresoft Co,.Ltd.)
That's interesting, can you make blank sample test it, I'm afraid other control has handled this event.
could you mind share a sample that could reproduce this problem ?
Thank you fore help so far.
I ma istalling VS 2022P maybe that will work on it...
@Nico Zhu (Shanghai Wicresoft Co,.Ltd.)
Ok. please let me know the test result.
@Nico Zhu (Shanghai Wicresoft Co,.Ltd.)
It didn\t solve my problem.
When I will have more of free time I will share my code with you.
thanks!
My project is on GitHub now. I need your nickname to make you a collaborator cause I made it private.
@Nico Zhu (Shanghai Wicresoft Co,.Ltd.)
Due to our policy, it is not suitable to make a forum support a collaborator of your private project.
We don't want to check your whole project because it might contain your private information. What we need is just a minimal, reproducible example. Please create a blank project. Then just add the necessary code which is used to reproduce the issue inside the project. Then you could share the sample in public with us.
@Nico Zhu (Shanghai Wicresoft Co,.Ltd.)
I don't know how i managed to make UI.Xaml Nuget for NumbeBox working in my original project, cause I made new project to show you the error and my number box won't show at all now... :/
@Nico Zhu (Shanghai Wicresoft Co,.Ltd.)
I figured out another way to do my program.
Can you show me how to make periodic event - every 1 second do something?
Sure, you could use DispatcherTimer to approach, here is sample code.
For more please refer official document.
@Nico Zhu (Shanghai Wicresoft Co,.Ltd.)
My project doesn't recognize "Threading" and "dispatcherTimer".
I used System.Threading and System.Timers and it didn't help.
It's my fault, I have updated the document, please use DispatcherTimer under
Windows.UI.Xaml
namespace.Thanks @Nico Zhu (Shanghai Wicresoft Co,.Ltd.)
I will check it out as soon as I return home.
Does it works, Any updates for this topic.
OK @Nico Zhu (Shanghai Wicresoft Co,.Ltd.)
Back to the problem.
I thought with 2022 or Win11 would fix the issues but it didn't.
Thanks
Sign in to comment
I was missing namespace - I cleaned up my code and it removed Input asset - that's why it didn't work.
Sign in to comment
0 additional answers
Sort by: Most helpful
Activity