private void AdjustAutoOrientationForDocking(PanelDockStyle dockStyle)
 {
     if (this.Orientation == Orientation.Auto)
     {
         if (this.GetOrientation() != Orientation.Vertical || (dockStyle != PanelDockStyle.Bottom && dockStyle != PanelDockStyle.Top))
         {
             if (this.GetOrientation() != 0)
             {
                 return;
             }
             if (dockStyle != PanelDockStyle.Left && dockStyle != PanelDockStyle.Right)
             {
                 return;
             }
         }
         MapSize      size          = new MapSize(this, this.Size.Height, this.Size.Width);
         PanelMargins panelMargins2 = base.Margins = new PanelMargins(base.Margins.Bottom, base.Margins.Right, base.Margins.Top, base.Margins.Left);
         this.Size = size;
     }
 }
 public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
 {
     if (context != null)
     {
         MapSize mapSize = (MapSize)value;
         if (mapSize.AutoSize)
         {
             PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(value, new Attribute[1]
             {
                 new BrowsableAttribute(true)
             });
             PropertyDescriptorCollection propertyDescriptorCollection = new PropertyDescriptorCollection(null);
             {
                 foreach (PropertyDescriptor item in properties)
                 {
                     propertyDescriptorCollection.Add(TypeDescriptor.CreateProperty(value.GetType(), item, new ReadOnlyAttribute(true)));
                 }
                 return(propertyDescriptorCollection);
             }
         }
     }
     return(base.GetProperties(context, value, attributes));
 }
 public MapSize(MapSize size)
     : this(size.Parent, size.Width, size.Height)
 {
 }
Beispiel #4
0
 public void SizeChanged(MapSize size)
 {
     this.SizeLocationChanged(SizeLocationChangeInfo.Size);
 }
Beispiel #5
0
 public Position(MapLocation location, MapSize size, ContentAlignment locationAlignment)
 {
     this.location          = location;
     this.size              = size;
     this.locationAlignment = locationAlignment;
 }