itamark77

When MapControl placed inside ScrollViewer pan not working

Discussion created by itamark77 on May 15, 2012
Latest reply on Apr 22, 2013 by bsundsbo
Hi,

When i place the map control inside a ScrollViewer the pan is not working (i still receive MouseMove and the zoom by mouse wheel still working as well as the esri:Navigation, esri:OverviewMap etc..)

You can recreate this issue with the following code:

<Window x:Class="TestMapScrollViewerIssue.MainWindow"
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:esri="http://schemas.esri.com/arcgis/client/2009"
        Title="MainWindow" Height="350" Width="525">
    <Grid>

        <ScrollViewer VerticalScrollBarVisibility="Auto"
                      Height="400"
                      Grid.Row="1"
                      Background="White">

            <!-- Map Control-->
            <esri:Map x:Name="_mapControl"
                      UseAcceleratedDisplay="False">

                <!-- * Tiled Basemap Layer(s) * -->

                <!-- ArcGIS Online Tiled Basemap Layer -->
                <esri:ArcGISTiledMapServiceLayer ID="arcGISTiledMapServiceLayer"
                                                 Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer" />
            </esri:Map>
        </ScrollViewer>
    </Grid>
</Window>


Please let me know if i am doing something wrong.

Thanks,
Itamar

Outcomes