public void SetSizeInPixels(SizeF size)
        {
            MapCore mapCore = GetMapCore();

            if (mapCore != null)
            {
                if (SizeUnit == CoordinateUnit.Pixel)
                {
                    Size = new MapSize(this, size.Width, size.Height);
                    return;
                }
                float num = 100f * size.Width / (float)mapCore.Width;
                num = ((!float.IsNaN(num) && !float.IsInfinity(num)) ? num : 0f);
                float num2 = 100f * size.Height / (float)mapCore.Height;
                num2 = ((!float.IsNaN(num2) && !float.IsInfinity(num2)) ? num2 : 0f);
                Size = new MapSize(this, num, num2);
            }
        }
 internal void SizeChanged(MapSize size)
 {
     SizeLocationChanged(SizeLocationChangeInfo.Size);
 }
Exemple #3
0
 internal MapSize(MapSize size)
     : this(size.Parent, size.Width, size.Height)
 {
 }
 public Position(MapLocation location, MapSize size, ContentAlignment locationAlignment)
 {
     this.location          = location;
     this.size              = size;
     this.locationAlignment = locationAlignment;
 }