Exemple #1
0
        public void Mullion_FullBoundsChanged(object sender, UMD.HCIL.Piccolo.Event.PPropertyEventArgs e)
        {
            Surface previousSurface = PreviousSurface();
            Surface nextSurface     = NextSurface();

            if (previousSurface == null || nextSurface == null)
            {
                return;
            }

            RectangleF nextBounds = nextSurface.Model.Bounds;

            if (Model.Orientation == Orientation.Vertical)
            {
                float oldX = nextSurface.Model.X;
                nextBounds.X                = Model.X + Thickness;
                nextBounds.Width            = nextBounds.Width + (oldX - (Model.X + Thickness));
                previousSurface.Model.Width = Model.X - previousSurface.Model.X;

                nextSurface.Model.Bounds = nextBounds;
            }
            else if (Model.Orientation == Orientation.Horizontal)
            {
                float oldY = nextSurface.Model.Y;
                nextBounds.Y                 = Model.Y + Thickness;
                nextBounds.Height            = nextBounds.Height + (oldY - (Model.Y + Thickness));
                previousSurface.Model.Height = Model.Y - previousSurface.Model.Y;

                nextSurface.Model.Bounds = nextBounds;
            }
        }
Exemple #2
0
 void Filling_BoundsChanged(object sender, UMD.HCIL.Piccolo.Event.PPropertyEventArgs e)
 {
     // Just to ensure that this never gonna get different bounds other than
     // the parent's ones
     if (Model.SurfaceParent != null)
     {
         Bounds = Model.SurfaceParent.Model.Bounds;
     }
 }