RichTextBox *** 作

RichTextBox *** 作,第1张

概述                             <RichTextBox Loaded="RichTextBox_Loaded" Width="auto" Height="auto"  DataContext="{Binding Msg.pszContent}" Margin="5,0,5,0" Grid.Column="1" Grid.Row="0" Foreground="Black

                             <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)
        {

            Item pItem = nctl_PPListBox.Items[m_nCount++] as Item;
            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 *** 作所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1073733.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存