Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 705
  • Last Modified:

WPF RichTextBox

I want to insert an InlineUIContainer on the caret position when a button is pressed.

How do I do that?

TIA
0
Thomasian
Asked:
Thomasian
1 Solution
 
saraganiCommented:
Try to have this code when the button is pressed:

 InlineUIContainer c = new InlineUIContainer(child, richTextBox1.CaretPosition);

where child is the child UIElement that you want to add into the rich text box
0
 
ThomasianAuthor Commented:
Perfect!

Thanks
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now