SuperMap.WindowsPhone.Mapping.Map.layer_OnLayerChanged C# (CSharp) Method

layer_OnLayerChanged() private method

private layer_OnLayerChanged ( object sender, EventArgs args ) : void
sender object
args System.EventArgs
return void
        private void layer_OnLayerChanged(object sender, EventArgs args)
        {
            if ((Point2D.IsNullOrEmpty(this.origin) && (!Rectangle2D.IsNullOrEmpty(this.cacheViewBounds) || Rectangle2D.IsNullOrEmpty(this.ViewBounds))) && (double.IsNaN(this.mapResolution) && (currentSize.Width > 0.0)))
            {
                if (this.Layers != null && !this.Layers.HasPendingLayers)
                {
                    this.Layers_LayersInitialized(sender, args);
                }
            }
            else
            {
                (sender as Layer).ClearValue(LastLayerViewBoundsProperty);
                Rectangle2D bounds = this.GetFullViewBounds();
                if (!Rectangle2D.IsNullOrEmpty(bounds))
                {
                    this.LoadLayerInView(false, bounds, sender as Layer);
                }
            }
        }