Beispiel #1
0
 public void SetLocation(UI.Point location, UI.Size size)
 {
     Width  = size.Width;
     Height = size.Height;
     Canvas.SetLeft(this, location.X);
     Canvas.SetTop(this, location.Y);
 }
Beispiel #2
0
 public void SetLocation(UI.Point location, UI.Size size)
 {
     Width  = Math.Ceiling(size.Width);
     Height = Math.Ceiling(size.Height);
     Canvas.SetLeft(this, location.X);
     Canvas.SetTop(this, location.Y);
 }
Beispiel #3
0
        public override bool OnTouchEvent(MotionEvent motionEvent)
        {
            var x = motionEvent.GetX();
            var y = motionEvent.GetY();

            switch (motionEvent.Action)
            {
            case MotionEventActions.Down:
                _strokeBrush.SetStyle(Paint.Style.Stroke);
                Invalidate();
                break;

            case MotionEventActions.Move:
                TouchMove(x, y);
                Invalidate();
                break;

            case MotionEventActions.Up:
                TouchUp();
                Invalidate();
                x = y = 0;
                break;
            }
            _currentTouch = new UI.Point(x, y);
            return(true);
        }
Beispiel #4
0
 public void SetLocation(UI.Point location, UI.Size size)
 {
     passwordBox.Width  = size.Width;
     passwordBox.Height = size.Height;
     Canvas.SetLeft(passwordBox, location.X);
     Canvas.SetTop(passwordBox, location.Y);
 }
Beispiel #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 virtual void SetLocation(UI.Point location, Size size)
        {
            var left   = location.X;
            var right  = location.X + size.Width;
            var top    = location.Y;
            var bottom = top + size.Height;

            Layout((int)left, (int)top, (int)right, (int)bottom);
        }
Beispiel #6
0
 public void SetLocation(UI.Point location, Size size)
 {
     Width    = (int)size.Width;
     Height   = (int)size.Height;
     Location = location.ToPoint();
 }