That selection is done with a double click. If it's done with a drag, I would assume that the space was intended to be selected, so something like this maybe:
Private Sub TextArea1_MouseClicked (EventData As MouseEvent)
If EventData.PrimaryButtonPressed And EventData.ClickCount > 1 Then
If TextArea1.SelectionStart >= TextArea1.SelectionEnd Then Return
Dim SelectedText As String = TextArea1.Text.SubString2(TextArea1.SelectionStart,TextArea1.SelectionEnd)
If SelectedText.CharAt(SelectedText.Length - 1) = " " Then
TextArea1.SetSelection(TextArea1.SelectionStart, TextArea1.SelectionEnd - 1)
End If
End If
End Sub
Edit: causes a problem if Control is held (nothing is selected) while double clicking so need to test that the selection contains text and ignore if not.
Or just trim it before using the value.