For loop: open window, wait until it is closed, then progress to the next step in the for loop

me123123123

New member
Joined
Feb 5, 2021
Messages
1
Programming Experience
Beginner
I am working with RelayCommands and a MessageBus.

I want to write a learning program. I have three windows:

1. Learning Tab -> Here I choose which List of Cards I want to learn and here I think I should write the for loop
2. Question -> The first question of the list of cards I gave to the for loop comes here; I answer the question which opens the answer window
3. Answer -> In this window my answer is shown ... then I want to open the next Question window witht he next question until the last question is answered and then it goes back to Learning Tab

I know how to open the window etc ... but I don't know how to make it wait for the next question
 

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
3,175
Location
Chesapeake, VA
Programming Experience
10+
There is a difference between procedural programming and event driven programming. What you are trying to do above is procedural programming and not compatible with WPF (and most other GUI frameworks) which are event driven. You need to think in an event driven way and restructure your code. What you want will be a simple state machine.
 
Last edited:
Top Bottom