title: Windows Phone 8.1 MapTileSource binding with MVVM
body: <p>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?</p>
  
  <pre><code>&lt;Maps:MapControl Style="{Binding Path=MapStyle}" Center="{Binding Path=MapCenter, Mode=TwoWay}" ZoomLevel="{Binding Path=ZoomLevel, Mode=TwoWay}" MapServiceToken=""&gt;
      &lt;Maps:MapControl.TileSources&gt;
          &lt;Maps:MapTileSource Layer="BackgroundReplacement" DataSource="{Binding Path=BaseLayerDataSource}" /&gt;
      &lt;/Maps:MapControl.TileSources&gt;
  &lt;/Maps:MapControl&gt;
  </code></pre>
  
  <p>I also tried with just a static data source with the same effect:</p>
  
  <pre><code>&lt;Maps:MapControl Style="{Binding Path=MapStyle}" Center="{Binding Path=MapCenter, Mode=TwoWay}" ZoomLevel="{Binding Path=ZoomLevel, Mode=TwoWay}" MapServiceToken=""&gt;
      &lt;Maps:MapControl.TileSources&gt;
          &lt;Maps:MapTileSource Layer="BackgroundReplacement"&gt;
              &lt;Maps:MapTileSource.DataSource&gt;
                  &lt;Maps:HttpMapTileDataSource UriFormatString="" /&gt;
              &lt;/Maps:MapTileSource.DataSource&gt;
          &lt;/Maps:MapTileSource&gt;
      &lt;/Maps:MapControl.TileSources&gt;
  &lt;/Maps:MapControl&gt;
  </code></pre>
  
  <p>Edit: I tried the sample code at <a href="http://msdn.microsoft.com/en-us/library/windows/apps/xaml/dn632728.aspx">http://msdn.microsoft.com/en-us/library/windows/apps/xaml/dn632728.aspx</a> 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.</p>
  
  <p>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:</p>
  
  <pre><code>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.
  </code></pre>