I added a try catch statement. That solved the nullreference error. But still the usercontrol wont show within the tabpage.