예제 #1
0
        private async void LoadImages(MapSource mapSource)
        {
            mapImage = await mapSource.GetMapImage();

            xrayMapImage = await mapSource.GetXRayMapImage();

            Dispatcher.Invoke(() => imageControl.Source = mapImage);
        }
예제 #2
0
        public void Initialize(MapViewModel mapViewModel, MapSource mapSource)
        {
            this.mapViewModel = mapViewModel;
            canvas            = new Canvas();

            imageControl = new Image();
            if (!DesignerProperties.GetIsInDesignMode(this))
            {
                Task.Run(() => LoadImages(mapSource));
            }
            canvas.Children.Add(imageControl);

            mapViewModel.PropertyChanged           += OnMapViewModelPropertyChanged;
            mapViewModel.Places.CollectionChanged  += OnMarkersCollectionChanged;
            mapViewModel.Players.CollectionChanged += OnMarkersCollectionChanged;

            CreateSelectedPoisitionControl();

            Child = canvas;
            Initialize(canvas);
        }