AnsweredAssumed Answered

MapView in ContentPresenter bug?

Question asked by bsundsbo on Apr 22, 2015
Latest reply on Jun 11, 2015 by bsundsbo



While playing around with the MVVM approach for the controls, I discovered something I believe is a bug. I was trying to display multiple viewmodels where the DataTemplate contains a MapView in an itemscontrol (TabControl), I discovered that the map is not displayed. I get an empty map, which is of no real use. It is just an empty control with the ESRI logo. I get the same result using a ContentPresenter.


The following should be sufficient to reproduce. SomeClass is just an empty class in this example. Having a map property on this class, and binding the MapView.Map to that property doesn't work either.

        <ColumnDefinition Width=".5*" />
        <ColumnDefinition Width=".5*" />
    <esri:MapView Grid.Column="0">
    <!-- This map works -->
            <esri:ArcGISTiledMapServiceLayer ID="h" ServiceUri="" />
    <ContentPresenter Grid.Column="1">
    <!-- This map does not work -->
            <DataTemplate DataType="viewModels:SomeClass" >
                        <esri:ArcGISTiledMapServiceLayer ID="h" ServiceUri="" />
            <viewModels:SomeClass />

I have to admit that this is rather inconvenient for what I need to do in my application, so I was wondering if there is a suggested workaround, and if this is possible to fix somewhat shortly?