V
V
Vladislav2020-10-05 15:49:47
WPF
Vladislav, 2020-10-05 15:49:47

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"
5f7b1458c95da591346355.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Pavlov, 2020-10-05
@Vladlen234

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 question

Ask a Question

731 491 924 answers to any question