So I'm working in VS12 on Windows 8, and hacking the ContosoCookbook code to make a different app. I'm trying to set up a "MainMenu.xaml" page and in I have:
<CollectionViewSource
x:Name="groupedItemsViewSource"
Source="{Binding Groups}"
IsSourceGrouped="true"
ItemsPath="TopItems"
d:Source="{Binding AllGroups, Source={d:DesignInstance Type=data:FlashCardDataSource, IsDesignTimeCreatable=True}}"/>
The error I'm getting is: The name "FlashCardDataSource" does not exist in the namespace "using:FlashCards.Data".
...but I don't understand how it doesn't. Where do I start looking? I'm new at XAML.
-Ken
If you are certain the class is present in the right namespace, just right click on the project in VS and choose Unload. Then Reload the project. This makes it re-evaluate all the namespaces and was the only cure for the issue I've found (when it really persistently won't acknowledge you classes;)
Check every class and xaml file for namespaces (even in App.xaml and MainWindow.xaml). Make sure you are not confusing the
x:Class
in the top element of the file with a namespace. Sometimes it indeed looks like a bug, but it's just one namespace somewhere that's independent of everything else that mixes up everything.