Ejemplo n.º 1
0
 // Figure out how much to adjust the top of box, which would be the input value of top
 // except for overlapping margins, if in fact margin overlaps the previous box.
 internal int AdjustTopForMargins(int top, LayoutInfo transform, Box prevBox, Box box)
 {
     if (prevBox != null)
     {
         top -= Math.Min(transform.MpToPixelsY(prevBox.Style.Margins.BottomMp),
                         transform.MpToPixelsY(box.Style.Margins.TopMp));
     }
     return(top);
 }
Ejemplo n.º 2
0
		// Figure out how much to adjust the top of box, which would be the input value of top
		// except for overlapping margins, if in fact margin overlaps the previous box.
		internal int AdjustTopForMargins(int top, LayoutInfo transform, Box prevBox, Box box)
		{
			if (prevBox != null)
			{
				top -= Math.Min(transform.MpToPixelsY(prevBox.Style.Margins.BottomMp),
					transform.MpToPixelsY(box.Style.Margins.TopMp));
			}
			return top;
		}
Ejemplo n.º 3
0
 public override void Layout(LayoutInfo transform)
 {
     // Height can only be a guess. This will do for a while, eventually we'll implement a way for the client
     // to control estimating.
     Height = transform.MpToPixelsY(DefaultItemHeight * 1000) * m_items.Count;
     // Set the width equal to all available. This faciliates invalidate rectangles that will certainly cover
     // whatever size the real box turns out to be, if this gets scrolled into view and invalidated.
     Width = transform.MaxWidth;
 }
Ejemplo n.º 4
0
		public override void Layout(LayoutInfo transform)
		{
			Height = transform.MpToPixelsY(MpHeight) + SurroundHeight(transform);
			Width = transform.MpToPixelsX(MpWidth) + SurroundWidth(transform);
		}
Ejemplo n.º 5
0
 public override void Layout(LayoutInfo transform)
 {
     Height = transform.MpToPixelsY(MpHeight) + SurroundHeight(transform);
     Width  = transform.MpToPixelsX(MpWidth) + SurroundWidth(transform);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Return the estimated height of the indicated item. Index is relative to m_items, not necessarily
 /// to the total collection of items in the list managed by the hookup.
 /// Enhance JohnT: eventually we will allow the client to supply a non-trivial height estimator.
 /// </summary>
 int EstimatedItemHeight(LayoutInfo transform, int index)
 {
     return(transform.MpToPixelsY(DefaultItemHeight * 1000));
 }