Can a VisualElement Bind to a Field in Editor, or to a Local Variable in CreateInspectorGUI?

If I have a TextField in my editor, but I don’t want to directly assign it to a type in MonoBehaviour, but rather process it internally in the editor first, turning it into other data before passing it to MonoBehaviour, does that mean I can’t use Bind? Or can I bind to the fields of the Editor class? Do I have to write such complex silly hard code like this to get the value of TextField?

string text = root.Q("VerticalContainer").Q("HorizontalContainer").Q<TextField>("FileName").text;

How may text fields are there called FileName in your visual element heirarchy? If it’s just the one, then no. Querying is recursive. You just have to query at the highest visual element you expect the visual element to reside at.

So your example could just boil down to:

var textField = root.Q<TextField>("FileName");
if (textField != null)
{
    text = textField.text;
}

In any case there’s two different API’s for runtime and editor binding. I would just refer to the docs with respect to both.