本帖最后由 mengxin523 于 2010-04-06 22:59:39 编辑

解决方案 »

  1.   

     TextRange t = new TextRange(Richtextbox1.Selection.Start, Richtextbox1.Selection.End);
     new InlineUIContainer(imageControl1, Richtextbox1.Selection.Start);
      

  2.   

    TextRange t = new TextRange(Richtextbox1.Selection.Start, Richtextbox1.Selection.End);
     new InlineUIContainer(imageControl1, Richtextbox1.Selection.Start);多粘了一句话。
      

  3.   

    你好,我在按钮事件里面这样写:
                Image img = new Image();
                BitmapImage bImg = new BitmapImage();
                bImg.UriSource = new Uri(@"D:\未命名.jpg", UriKind.Relative);
                img.Source = bImg;
                this.richTextBox1.Document.Background=Brushes.Aqua;
                new InlineUIContainer(img, richTextBox1.Selection.Start);貌似不行啊,只有背景颜色改了,其他都没变化。PS:这个图片是存在的!或者我漏了什么东西,请说详细一点吧,谢谢
      

  4.   

                Image img = new Image();
                BitmapImage bImg = new BitmapImage();
                bImg.BeginInit();
                bImg.UriSource = new Uri(@"D:\未命名.jpg", UriKind.Relative);
                bImg.EndInit();
                img.Source =bImg;            new InlineUIContainer(img, richTextBox1.Selection.Start);