Answer the question
In order to leave comments, you need to log in
How to add a number to a TextBlock on button click?
I need to add a number to the TextBlock with the name "Points" by pressing the +1 button
and vice versa by pressing the -1 button to decrease the number in the TextBlock with the name "Points"
Answer the question
In order to leave comments, you need to log in
Create a variable at the class level, and in the events that occur when the buttons are pressed, override or subtract the value and assign it to textbloc
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question