I am making slow progress with a simple application that I am making: it creates a request, fills in the headers and selects a webpage for me. I realized that to update the user interface (after clicking the button) I have to use the dispatcher as follows:
Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new delegate_onearg_s(UpdateStatus), "Sending Request...");
In this case, I have UpdateStatus (a string message) that sets my message label_Status =
So far so good. Now I want him to first enter the input from the text field, and then turn it into the URL, which is used later to create the request, but how to do it? I tried this:
string url = Convert.ToString(Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new delegate_string_get(GetInput)));
GetInput () in this case simply returns textBox.Text; It really doesn't work - it returns some common thing related to the dispatcher.
How can I get a variable from a text field in a user interface thread and get it in a workflow with a dispatcher?
Merci beacoup :)
PS. There is a very high probability that I do not know what I am doing. Just keep that in mind when replying.
source
share