This error is quite interesting. It appears straight after you create a new WPF project, i.e. Windows1.xaml is empty.
By changing the Device Profile in Color Management to System Default, this problem goes away
It is even more interesting that if you have your project open and change the Device Profile back to something else, the error would not reappear. However If you close the project and open it again, it will.
So anyone knows what’s the difference between all these profiles?