I want to display dynamic header in a cshtml. When i try to pass it using CustomSwitches i get an error like QPaintDevice: Cannot destroy paint device that is being pain