I want to position a popup near the RichTextBox.CaretPosition after a user has entered some key combination. The problem is that the contents of the RichTextBox.Document are block element that did not have Height and Width. Does anyone had an idea how to achieve this?
For now my only option is to loop through all the block and all their inlines and calculate the FontSize or width (if there are some UIElement in the document).
However I'm interested how the AnnotationService displays their popup for adding annotations over selected text. Looking at its code it seems complex and messy. Any ideas?