I'm trying to bind the DataSource of a MapTileSource to a property on my view model, but I am getting the error REGDB_E_CLASSNOTREG on the Maps:MapTileSource line (underlined in blue is VS editor). I could always use a binding helper to achieve the same effect (I needed to in the 8.0 version of my app) but this seems like it should just...work. Any idea what is wrong?
<Maps:MapControl Style="{Binding Path=MapStyle}" Center="{Binding Path=MapCenter, Mode=TwoWay}" ZoomLevel="{Binding Path=ZoomLevel, Mode=TwoWay}" MapServiceToken="">
<Maps:MapControl.TileSources>
<Maps:MapTileSource Layer="BackgroundReplacement" DataSource="{Binding Path=BaseLayerDataSource}" />
</Maps:MapControl.TileSources>
</Maps:MapControl>
I also tried with just a static data source with the same effect:
<Maps:MapControl Style="{Binding Path=MapStyle}" Center="{Binding Path=MapCenter, Mode=TwoWay}" ZoomLevel="{Binding Path=ZoomLevel, Mode=TwoWay}" MapServiceToken="">
<Maps:MapControl.TileSources>
<Maps:MapTileSource Layer="BackgroundReplacement">
<Maps:MapTileSource.DataSource>
<Maps:HttpMapTileDataSource UriFormatString="" />
</Maps:MapTileSource.DataSource>
</Maps:MapTileSource>
</Maps:MapControl.TileSources>
</Maps:MapControl>
Edit: I tried the sample code at http://msdn.microsoft.com/en-us/library/windows/apps/xaml/dn632728.aspx and it works fine, so it seems obvious that the MapTileSource itself is not unregistered. But that is all codebehind and uses no data binding, so it is not of much use to me.
Edit 2: If I ignore the error and try to deploy the app to the phone emulator, I get this on InitializeComponent() of the view:
An exception of type 'Windows.UI.Xaml.Markup.XamlParseException' occurred in HikePoint.exe but was not handled in user code
WinRT information: Cannot deserialize XBF metadata type list as '%1' was not found in namespace '%0'. [Line: 0 Position: 0]
Additional information: The text associated with this error code could not be found.
Cannot deserialize XBF metadata type list as '%1' was not found in namespace '%0'. [Line: 0 Position: 0]
If there is a handler for this exception, the program may be safely continued.