public override void SetLocation(int left, int top)
{
var targetBox = this.TargetBox;
int diffX = 0, diffY = 0;
if (targetBox != null)
{
var targetBoxLocation = targetBox.GetGlobalLocation();
diffX = left - targetBoxLocation.X;
diffY = top - targetBoxLocation.Y;
}
base.SetLocation(left, top);
//move target box together
if (targetBox != null)
{
//move target box too
//get global
//targetBox.SetLocation(left + this.GridSize, top + this.GridSize);
targetBox.SetLocation(
targetBox.Left + diffX + this.GridSize,
targetBox.Top + diffY + this.GridSize);
}
}
protected override void OnKeyDown(UIKeyEventArgs e)