In my project, I have several WPF windows and controls. For each one, I've created a sample view model so I can see the window or control mocked-up with sample data in the XAML designer by including a line like this:
d:DataContext="{x:Static views:SampleViewModels.SampleVariableViewModel}"
That has worked great for years. However, sometime today, or possibly yesterday, the XAML designer stopped showing sample data on my computer. Every view, in both current and old revisions of code, is shown without the data from its sample view model. I've rebuilt the project, restarted Visual Studio, and rebooted the computer, to no effect. This problem affects only me; my colleagues see the sample data properly.
Importantly, the XAML designer is showing some data, just not the right data. When a field is bound to "Name", for instance, the designer is using the text "Name". Numbers are (sometimes?) filled-in with 0. And where my view model has a collection, the designer shows me 3 elements. It is as if something is creating a very crude sample view model and using it instead of my carefully prepared sample view model.
Note that other than ignoring my sample data, the XAML designer is working fine. And everything works perfectly at runtime.
Is there any known "feature" of Visual Studio that could be doing this? Might I have accidentally hit some key combination that turned on some little-known XAML designer mode?
I'm using Visual Studio Community 2015. I've disabled Resharper, and I don't think I'm using any other extension that could do something like this. Any ideas?
Update: I deleted everything from the ShadowCache folder. That didn't help.
Update: I installed Visual Studio Community 2017. Everything works properly in that version, but still doesn't work in Visual Studio Community 2015.