0

I am a beginner WPF developer, and creating simple utility programs right now. I want to know if there is a simple way to send a text update to the user from within the main thread in a WPF application, and see it appear before the thread has finished?

Edit:

I specifically wanted to do this from the main thread. And without any background worker thread complexity. The comment that worked is this:

this.Title = "Some new text";

This updates immediately from the main thread. Nothing else updates whatever I tried.

Debora
  • 89
  • 1
  • 4
  • 1
    You can use the Title property of the window, if you don't mind the text appearing right there. But you should get into the habit of running longer processes in a task. – Dean Sep 17 '14 at 03:12
  • Closed. Please see my answer to the question marked as duplicate to understand the basic approach to multi threading in WPF. If that answer does not satisfy your needs, please post a new question including a detailed description of your problem and relevant code snippets showing what solutions you tried. – Federico Berasategui Sep 17 '14 at 06:03
  • I thought the question was ok, your answer really is great but maybe a lot to take in for a beginner. OP did specify 'main' thread too so the trick I posted in the comment I think is very usable as a quick and dirty situation. Can this be re-opend, because using the title is a trick I never saw on SO before. – Dean Sep 17 '14 at 14:34

0 Answers0