darkwind — 2014-01-19T17:41:34-05:00 — #1
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?
force — 2014-01-19T22:38:30-05:00 — #2
With WPF or WinForms, you can use a message box to quickly spit out output:
cpradio — 2014-01-20T05:56:53-05:00 — #3
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";
wwb_99 — 2014-01-28T18:15:08-05:00 — #4
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.