Tryig to modify the XForm in code but everytime I attempt to use the FormControl an exception occurs because it is null.
For example if I attempt to modify controls by adding additional attributes and attempting to set the FormDefinition.
The issue was caused by me trying to integrate one of the other examples and missing a typo (lowercase/UPPERCASE) which my IDE didn't complain about either.
Lessons learnt over reliance on IDE.