Hi,
I use WPF in Revit and I generally set them up as Page. That way I managed to run different actions in Revit while the WPF is active. You may try to set on Page and see if it helps you.
Anyway, I used Jeremy's links as a guide to build my WPF code, have a look at them I'm sure they are helpful to you.
Bye