예제 #1
0
 public void SetLocation(Point location, Size size)
 {
     Width        = (int)size.Width;
     Height       = (int)size.Height;
     _hasMeasured = size.Height > 0 && size.Width > 0;
     FitText();
     Location = location.ToPoint();
 }
예제 #2
0
        /// <summary>
        /// Sets the location and size of the control within its parent grid.
        /// This is called by the underlying grid layout system and should not be used in application logic.
        /// </summary>
        /// <param name="location">The X and Y coordinates of the upper left corner of the control.</param>
        /// <param name="size">The width and height of the control.</param>
        public void SetLocation(Point location, UI.Size size)
        {
            var left   = location.X;
            var right  = location.X + MeasuredWidth;
            var top    = location.Y;
            var bottom = location.Y + MeasuredHeight;

            Layout((int)left, (int)top, (int)right, (int)bottom);
        }
예제 #3
0
        void IElement.SetLocation(Point location, Size size)
        {
            var left   = location.X;
            var right  = location.X + size.Width;
            var top    = location.Y;
            var bottom = location.Y + MeasuredHeight;

            Layout((int)left, (int)top, (int)right, (int)bottom);
        }
예제 #4
0
        /// <summary>
        /// Sets the location and size of the control within its parent grid.
        /// This is called by the underlying grid layout system and should not be used in application logic.
        /// </summary>
        /// <param name="location">The X and Y coordinates of the upper left corner of the control.</param>
        /// <param name="size">The width and height of the control.</param>
        public void SetLocation(Point location, Size size)
        {
            var left   = location.X;
            var right  = location.X + size.Width;
            var top    = location.Y;
            var bottom = location.Y + size.Height;

            Layout((int)left, (int)top, (int)right, (int)bottom);
        }
예제 #5
0
        /// <summary>
        /// Sets the location and size of the control within its parent grid.
        /// This is called by the underlying grid layout system and should not be used in application logic.
        /// </summary>
        /// <param name="location">The X and Y coordinates of the upper left corner of the control.</param>
        /// <param name="size">The width and height of the control.</param>
        public void SetLocation(Point location, Size size)
        {
            Location = location;
            Size     = size;
            var par = Parent as GridControl;

            if (par != null)
            {
                par.Redraw();
            }
        }
예제 #6
0
        /// <summary>
        /// Sets the location and size of the control within its parent grid.
        /// This is called by the underlying grid layout system and should not be used in application logic.
        /// </summary>
        /// <param name="location">The X and Y coordinates of the upper left corner of the control.</param>
        /// <param name="size">The width and height of the control.</param>
        public void SetLocation(Point location, Size size)
        {
            var left   = location.X;
            var right  = location.X + size.Width;
            var top    = location.Y;
            var bottom = location.Y + size.Height;

            Layout((int)left, (int)top, (int)right, (int)bottom);

            var widthSpec  = MeasureSpec.MakeMeasureSpec((int)size.Width, MeasureSpecMode.Exactly);
            var heightSpec = MeasureSpec.MakeMeasureSpec((int)size.Height, MeasureSpecMode.Exactly);

            _button.Measure(widthSpec, heightSpec);
            _button.Layout(-Padding, -Padding, (int)size.Width + Padding, (int)size.Height + Padding);
        }
예제 #7
0
 public void SetLocation(Point location, Size size)
 {
     Frame = new RectangleF((float)location.X, (float)location.Y, (float)size.Width, (float)size.Height);
     if (stretch == UI.ContentStretch.None)
     {
         if (Frame.Width < Dimensions.Width || Frame.Height < Dimensions.Height)
         {
             ContentMode = UIViewContentMode.ScaleAspectFit;
         }
         else
         {
             ContentMode = UIViewContentMode.Center;
         }
     }
 }
예제 #8
0
 public void SetLocation(Point location, Size size)
 {
     Frame = new CGRect((float)location.X, (float)location.Y, (float)size.Width, (float)size.Height);
 }