Skip to main content
Home Forums Silverlight Programming Programming with .NET - General write to the screen
8 replies. Latest Post by adefwebserver on July 26, 2008.
(0)
mexican
Member
164 points
713 Posts
07-25-2008 9:20 AM |
is there an easier way to write variables contents to the screen apart from assigning to a textbox.
I have 4-5 textboxes already and it would be better if i could writeln to the screen
I dont like trace vars or breakpoints .
i am tring to do better debugging in silverlight
codism
372 points
121 Posts
07-25-2008 9:47 AM |
do you know if you double click the title bar of the output window in visual studio, you can move the output window any where on your screen. Is that you wanted?
rajesh s...
Contributor
2314 points
505 Posts
07-25-2008 10:43 AM |
hi you can use textbox with text-wrap property equal to true
e.g.
<TextBox Height="77" Margin="173,0295137" VerticalAlignment="Bottom" Text="TextBox" TextWrapping="Wrap" x:Name="Target1"/>
07-25-2008 9:02 PM |
is there a way to just write to the silverlight app from vb.net? like a writeline?
All these textboxes get messy.
not sure what the 1st reply was saying but i wanted to display values on the silverlight app
sladapter
All-Star
17439 points
3,172 Posts
07-25-2008 9:47 PM |
use Textblock. Append your text to the TextBlock.Text;
<Textblock x:Name="message" />
in code:
this.Message.Text += "Your new line of text\n\r";
07-26-2008 12:08 AM |
i meant i want to write to the screen without using a control,just straight on the canvas
SteveWong
6343 points
1,281 Posts
07-26-2008 12:18 AM |
You cant but you can use an alert to help you for the debugging
robhouwe...
3158 points
540 Posts
07-26-2008 5:45 AM |
What the first reply means is that you can use the debugging features of VS2008 to debug instead of writing it to your SL application.
When using Debug.WriteLine("My debugging data"); in the code it writes to the output window in VS2008.
You can place this window anywhere you like, so you can tile the windows to view the output window and the application at the same time.
(If this has answered your question, please click on mark as answer on this post)Cheers!Rob Houweling
adefwebs...
436 points
07-26-2008 10:36 AM |
mexican: i meant i want to write to the screen without using a control,just straight on the canvas
The answer is no. When we look at the properties for the Canvas control:
http://msdn.microsoft.com/en-us/library/system.windows.controls.canvas_properties(VS.95).aspx
we see that there are no properties to display text.