I overlooked this part:
This exception only appears when I have the arduino software running and getting the temperature values. When it's not running, nothing happens, and the buttons don't work. here is the code of my WFApplication.
To OP: you can't have two applications open the same com port at the same time. If you have the Arduino IDE running and serial monitor open, COM4 (or whatever it is) is locked. You have to close the serial monitor or probably quit the entire Arduino IDE before your C# app can open COM4.
This will make the "port locked" error go away.
If the program doesn't work, keeping the Arduino IDE open is not the solution.