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); }
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); }
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); }
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); }
/// <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); }
public void SetLocation(UI.Point location, Size size) { Width = (int)size.Width; Height = (int)size.Height; Location = location.ToPoint(); }