Thanks. But let me explain what this button is actually for: I'm trying to use it as a replacement for the "New" button (without relying on the registry or any system templates),
So I want it to work like the normal "new file" behavior—triggering inline rename, not a pop-up dialog.
Anyway, thanks everyone—I've got a working solution now.