views:

116

answers:

3

I really like using Console applications to learn different aspects of .NET programming. I'm wondering if there is a way to emulate the Console in a Silverlight or WPF application.

Is there already an open source Console control that I could plug into my application?

Most importantly, I'd need to be able to emulate the appropriate Read and Write methods of System.Console.

Obviously, re-using a component someone else has already built would be ideal, but if I needed to build a "Console control" from scratch, what might I need to consider?

A: 

A similar idea is implemented as an example of IronPython running on Silverlight.

Try Python is an interactive Python tutorial created for Silverlight and Moonlight by Michael Foord.

Browse the source to get an idea how an interactive Silverlight console is built.

gimel
A: 

How about in the properties of the WPF Application setting it to Console Application? That way you get both the console and the WPF application and can use the Console.WriteLine etc. as normal? Otherwise, use the output window in Visual Studio when you run in debug.

Not sure about Silverlight tho.

Goblin
+1  A: 

Try Silverlight Console on CodePlex. It seems like it's got a few dependencies you need to add to your project in order to get it to work, but it might meet your needs.

Personally, I'd like an application that allows me to take my Console application code and drop it into a Silverlight app with minimal tweaking. Maybe I'll make that my next big at-home project :-).

Ben McCormack