C
C#15mo ago
Rockraizer

✅ Synchronize text box to calculate the average of the next 5 text boxes

I have a WPF project where I want to calculate the average of 5 textboxes. I want to synchronize them to always show the value of the currently typed values in the text box. Thanks the help!
5 Replies
ACiDCA7
ACiDCA715mo ago
maybe im misunderstanding.. you want to have 5 textboxes where everone has always the same value and you want to have the average? the average of 5 time the same value is the same as the value
Rockraizer
RockraizerOP15mo ago
No sorry if I phased it badly. These values are different in these 5 text boxes. These 5 different values need to be calculated.
ACiDCA7
ACiDCA715mo ago
the quick and dirty variant would be subscribe to the changed event of every text box and when it gets invoked update the last textbox the cleaner way would be via bindings in a viewmodel
Rockraizer
RockraizerOP15mo ago
Ooooh, thank you. I check out what are those binding also. 😄
Accord
Accord15mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server