c# - Copy complete console output in a WPF TextBox? -


i' ve several places in c# code, output things console. using console.writeline, via tracelisteners system.diagnostics.consoletracelistener.

now want display output in wpf textbox. possible bind console output 1:1 in way textbox?

or have change every single call of tracelisteners or console.writeline add output textbox.text additionally?

you can use console.openstandardoutput intercept console.writeline()- answer , link explain how implement textboxstreamwriter , inject in standard output stream.

as consoletracelistener - should able write own textbox based tracelistener , assign appropriate tracesources (as support multiple trace listeners). answer highlights how implement same.

more details regarding trace sources , listeners can found here.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -