using templatelayouts for header and tray.