Review Code and advices - WPF movement | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Review Code and advices - WPF movement

I Made a Code to make an Object (Block) with the lesser knowledge I have and a bit stackoverflow. I'm already proud that it works but I still want to ask you Guys where and how I could improve something. Note: I know I should rather make a Object class but for one Object it's Not that important and sry for the mess of a Code... I tried my best https://code.sololearn.com/c3AWM99yc3W1/?ref=app

7th Aug 2022, 2:10 AM
Felix Alcor
Felix Alcor - avatar
2 Answers
+ 1
Good question. I'm the type of programmer that If it works it works. But with out error of course. There are so many different ways to get the same output in code. It is not always a better way. Unless programmers agree that its a best practice. You can make it more readable but I wouldn't really worry about trying to improve unless the performance is slow of it there is a real error.
30th Aug 2022, 7:59 PM
Chris Coder
Chris Coder - avatar
0
Thanks for the answer but I have somethings I would like to Change. First would be make a relative variable for Screen height and width, maybe I make property for that that give the Base value and that Update in Change. Second I would like to fix that Inputs cancel each other, my thinking of that would be to Check per tick which Key is pressed but I don't Like that much.
1st Sep 2022, 2:52 PM
Felix Alcor
Felix Alcor - avatar