Before I begin, this is more of a question about a Popup control rather than the RadRichTextBox itself. Feel free to move this post if you think it should belong in a different section.
I've been creating my own RadRichTextBox Intellisense application where I'm positioning a Popup control based upon the caret position.
I know how to obtain the position of the caret, like so:
Point position =
position = richTextBox.ActiveEditorPresenter.GetViewPointFromDocumentPosition(richTextBox.Document.CaretPosition);
The problem I have is that the Popup placement will alter depending on the size of the Popup/ListBox and if it is positioned towards the top or bottom of the screen.
When the the Popup is showing above my position point (the caret is the bottom of the screen) it is aligned in the correct place. However, should the caret be towards the top of the screen, the top edge of the Popup is aligned with the top of the caret.
You can better see what I mean from the attached images.
I need to some way to determine if the popup placement is Above or Below my point and adjust the vertical offset accordingly.
Thank you for your time,