You only need one #if in the whole file if you do this:

#if XWT_GTK3
using TreeModel = ITreeModel
#endif