1

My application has a main window and other controls which I open inside the window, one of these controls is one which contains a map, it appears but I can't move it by holding a dragging also the click event on the map is not provoked. What is causing this?

XAML:

<UserControl x:Class="ModernUINavigationApp1.Pages.KasrOkeelPages.Inputs"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
         xmlns:mui="http://firstfloorsoftware.com/ModernUI"
         xmlns:esri="http://schemas.esri.com/arcgis/client/2009"

         mc:Ignorable="d" 
         d:DesignHeight="300" d:DesignWidth="300" MouseDoubleClick="UserControl_MouseDoubleClick" MouseClick="MyMap_MouseClick" Focusable="True">
<Grid Style="{StaticResource ContentRoot}" x:Name="LayoutRoot">
    <esri:Map x:Name="MyMap" UseAcceleratedDisplay="True" Cursor="Cross" Extent="330671.7091,2854689.5845,344178.0091,2862125.3845"  IsEnabled="True" DragOver="MyMap_DragOver" IsLogoVisible="False" WrapAround="True">
        <!--Local Dynamic Layer-->
        <esri:ArcGISLocalDynamicMapServiceLayer ID="MYLAYERS" Path="C:\Users\Ahmad Elsayed\Desktop\test app\GIS APP2\packTest\Untitled2.mpk"/>

    </esri:Map>
</Grid>

C# :

    using FirstFloor.ModernUI.Windows.Controls;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Data;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Imaging;
    using System.Windows.Navigation;
    using System.Windows.Shapes;

    namespace ModernUINavigationApp1.Pages.KasrOkeelPages
    {
        /// <summary>
        /// Interaction logic for Inputs.xaml
        /// </summary>
        public partial class Inputs : UserControl
        {
            public Inputs()
            {
                InitializeComponent();
            }

            private void MyMap_DragOver(object sender, DragEventArgs e)
            {

            }

            private void UserControl_MouseDoubleClick(object sender, MouseButtonEventArgs e)
            {

            }

private void MyMap_MouseClick(object sender, ESRI.ArcGIS.Client.Map.MouseEventArgs e)
        {

        }
        }
    }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.