WPF Sackpanel figure overflowing the section it is contained in

0

0x450x78

I'm trying to create an InstantMessaging client and I want my InstantMessage
Conversation to be a RichTextBox control which displays an avatar to the left
of each instant message. (A little like googletalk). However unlike
googletalk, if an instant message is very long I don't want it to wrap under
the avatar. I thought using a table would be the ideal solution, but this
posed some problems(question raised under a separate topic), so I'm trying to
use a combination of sections, paragraphs, figures and stackpanels to create
the UI.

Each Instant message is a section, and within each section I lay out the
avatar and the instant message. I place the avatar as follows ( See below for
full xaml):

<Section Background="White" BorderBrush="Black" BorderThickness="1">
<Paragraph>
<Figure Background="White" CanDelayPlacement="True"
HorizontalAnchor="ContentLeft" VerticalAnchor="ParagraphTop">
<Paragraph>
<StackPanel Width="80" >
<Image Source="unknown.png"/>
</StackPanel>
</Paragraph>
</Figure>
</Paragraph>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top