<RichTextBox Loaded="RichTextBox_Loaded" WIDth="auto" Height="auto" DataContext="{Binding Msg.pszContent}" margin="5,5,0" GrID.Column="1" GrID.Row="0" Foreground="Black" FontSize="20" >
<Paragraph>
<Hyperlink>aaa</Hyperlink>bbb
<Hyperlink>ccc</Hyperlink>
<Run>Paragraph 3</Run>
<InlineUIContainer>
<Image MouseleftbuttonUp="nctl_PPListBox_MouseleftbuttonDown" WIDth="auto" Height="80" Source="/Image/message_sendsucces.png" ></Image>
</InlineUIContainer>
<InlineUIContainer>
<button Content="hello"></button>
</InlineUIContainer>
</Paragraph>
</RichTextBox>
private voID RichTextBox_Loaded(object sender,RoutedEventArgs e)
{
RichTextBox pRichTextBox = pItem.pRichTextBox = sender as RichTextBox;
Paragraph prgParagraph = new Paragraph();
Run rnMyText = new Run();
rnMyText.Text = "This is some example text with a ";
prgParagraph.Inlines.Add(rnMyText);
Hyperlink lnkSSlink = new Hyperlink();
lnkSSlink.Click += new RoutedEventHandler(HyperlinkClickEventHandle);
lnkSSlink.Inlines.Add("link to Silverlight Show");
prgParagraph.Inlines.Add(lnkSSlink);
InlineUIContainer pp = new InlineUIContainer();
Image pImage = new Image();
pImage.source = new BitmAPImage(new Uri("/Image/message_sendfail.png",UriKind.relativeOrabsolute));
pp.Child = pImage;
prgParagraph.Inlines.Add(pp);
//pp.Inlines.Add("ss");
//prgParagraph.Inlines.Add(pp);
pRichTextBox.Blocks.Add(prgParagraph);
}
总结以上是内存溢出为你收集整理的RichTextBox *** 作全部内容,希望文章能够帮你解决RichTextBox *** 作所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)