2012-01-24 7 views
0

私はチャットプログラムを作成したいと思っています。メッセージは、特にIM + WP7のように別の方法で表示できます。しかし、私は霧の中で、選ぶことをコントロールします。 プラットフォーム:.NET 4.0、WPF app。 PS:FlowDocumentScrollViewerが重い、他の提案が見つかりましたか? (または、FlowDocの使い方の良い例)。WPFでメッセージを表示するコントロール

答えて

0

初心者の方:WPF Flow Document For Beginners

同じ著者の先進例:WCF/WPF Chat Application

最も単純なフロードキュメントの例:

<!-- This simple flow document includes a paragraph with some 
    bold text in it and a list. --> 
<FlowDocumentReader xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> 
    <FlowDocument> 
    <Paragraph> 
     <Bold>Some bold text in the paragraph.</Bold> 
     Some text that is not bold. 
    </Paragraph> 

    <List> 
     <ListItem> 
     <Paragraph>ListItem 1</Paragraph> 
     </ListItem> 
     <ListItem> 
     <Paragraph>ListItem 2</Paragraph> 
     </ListItem> 
     <ListItem> 
     <Paragraph>ListItem 3</Paragraph> 
     </ListItem> 
    </List> 

    </FlowDocument> 
</FlowDocumentReader> 
1

私は、各メッセージについてのTextBlockで行くと思います。

それでも

+0

など、太字、斜体、色、ハイパーリンクのようなものをサポートできるように、AのTextBlockは、テキストの複数の異なるスタイルを含めることができますおかげで、それが実行するためのコントロールの任意の種類を表示することができますので、FlowDocumentを使用します私の仕事。私はそれを使用しました。 – user1167602

関連する問題