private Point calculateSuggestionBoxPosition(Point caretPosition)
{
if (caretPosition.X + autoCompleteForm.getActualWidth() > Screen.PrimaryScreen.Bounds.Width)
{
caretPosition.X = Screen.PrimaryScreen.Bounds.Width - autoCompleteForm.getActualWidth();
}
if (caretPosition.Y + autoCompleteForm.Height > Screen.PrimaryScreen.Bounds.Height)
{
// TODO: Must consider the current font size as well
caretPosition.Y = caretPosition.Y - autoCompleteForm.Height - 20;
}
return caretPosition;
}