Mental Block

Okay, I seem to have some kind of learning block going on here and I cannot find the answer anywhere.

In C#, when I have to output something, in a console application, I output the using the system.console.writeline(); method.

Console.WriteLine(“This is some output”); //This will output to a console window the text, “This is some output”.

Now, when I create a window using the windows form or the WPF…I have a graphical interface that is a blank window.

How do I output to that window using the same kind of method?

With WPF or WinForms, you can use a message box to quickly spit out output:

Yes, you can use a messagebox, or if you open the Toolbox (Ctrl + X) or View > Toolbox, you can drag a label to the GUI and then use labelname.Text = “My Message”;

Messageboxes suck for output – unless you like speaking through modal dialogs.

WPF and winforms are vastly different beasts. For winforms, I used to just build a multiline textbox and append lines to the bottom to catch the output sort of messages one would Console.WriteLine(). WPF wants you to do some databinding stuff I never quite got my head around enough to explain.