I would clearly recommand you using MVVM and databinding in this case.
I see you have a class XXX with a "record_content" property which is bound to the Text Property of the TextBox. (I think that you omitted the Mode=TwoWay Binding option to ensure that changes in the TextBox change the record_content property value)
You could add a recordContentSelectedText property, bound to the SelectedText property of your TextBox:
<TextBox [...] SelectedText="{Binding recordContentSelectedText,Mode=TwoWay}"/>
the datacontext of your TextBox is an instance of XXX which record_content contains the TextBox content.... And the ContextMenu and its items have the same DataContext!
If the property value is correctly updated by your databinding, it will be very easy:
var data = this.DataContext as XXX;
var selectedText = this.recordContentSelectedText;
It will work only if your DataContext is bound only to one TextBox in the list. Otherwise, TextBox selected text synchronization will occur as a side effect (I don't know if you understand what I mean, but it could be an issue or not, depending on the behavior you expect from your app)