System windows markup xamlparseexception. #include "mainform.h" using namespace system; using namespace system::windows::forms; [stathread].