GPWiki.org
GPWiki.org
It is currently Sun May 19, 2013 12:15 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Sep 12, 2011 3:09 am 
Ankle Nibbler
User avatar

Joined: Tue Dec 20, 2005 12:28 am
Posts: 140
TextBlock wrapping of text in Silverlight XAML file.

I have a wierd and annoying problem. I have a textblock that is inside a stackpanel that is Oriented horizontal. It would be nice if I could have the textblock appear in multiple lines nicely wrapped. How could I do that?


Top
 Profile  
 
PostPosted: Mon Sep 12, 2011 12:36 pm 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11182
Location: Abingdon, MD
This appears to work for me:

Code:
<Grid x:Name="LayoutRoot" Background="Azure">
        <StackPanel Orientation="Horizontal">
            <TextBlock TextWrapping="Wrap" Width="250" Height="100" Text="This is some long text that we hope will wrap correctly when placed in a StackPanel that is set to Horizontal orientation." />
        </StackPanel>
    </Grid>

What exactly are you doing?

_________________
Bored? Head on over to my blog and see what I'm up to.

Microsoft XNA MVP


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group