SuperMap.Connector.Control.WPF.MapControl.MapControl C# (CSharp) Method

MapControl() public method

初始化MapControl类的新实例。
public MapControl ( ) : System
return System
        public MapControl()
        {
            InitializeComponent();

            gMapControl1.CanDragMap = false;
            gMapControl1.DragButton = MouseButton.Left;

            Binding bZoom = new Binding();
            bZoom.Source = gMapControl1;
            bZoom.Path = new PropertyPath("Zoom");
            bZoom.Mode = BindingMode.TwoWay;
            this.SetBinding(ZoomProperty, bZoom);

            this.gMapControl1.OnPositionChanged += new GMap.NET.PositionChanged(gMapControl1_OnPositionChanged);
            this.gMapControl1.OnTileLoadComplete += new GMap.NET.TileLoadComplete(gMapControl1_OnTileLoadComplete);
            this.gMapControl1.MouseWheel += new MouseWheelEventHandler(gMapControl1_MouseWheel);
        }