I have a class with public DownloadAsync Method inside, that downloads Content over Webclient. I create an Object of that class and call the download Method.
My problem is: I would like to block Elements on UI (e.g. Buttons) until the download is done. I could not find any solution so far.
One Idea is: I could call a MessageBox with message like "download is done" in the Downloadcomplete Method and to call somehow an Eventhandler for MessageBox. But how?
Any idea how to solve my problem?
EDIT: I know hot to disable Elements, but because of asynchronuous download in the download method, I don't know when the download is over in order to enable back the elements