Hi,
I am looking to insert an InlineUIContainer by drag/drop of something into the RichTextBox but following dropping of the element, unless it is simple text being inserted I am struggling to work out how to insert an InlineUIContainer at the current cursor location.
I have managed to insert the control but only to the end of the document.
A code snippet below might help but errors not at point of insert but when it is trying to update the screen next... The code is taken from the drop handler event.
Dim point = args.GetPosition(richTextBox)
Dim pos = richTextBox.ActiveEditorPresenter.GetDocumentPositionFromViewPoint(point)
Dim container As New InlineUIContainer()
container.UiElement = New CheckBox() With {.Content = "Testing"}
container.Height = 25
container.Width = 70
ctype(pos.GetCurrentInline().Parent,Paragraph).Inlines.Add(container)
Kind regards,
Neil