2
在XAML我已經定義我的畫布:我如何獲得更流暢的翻譯?
<Canvas Name="GameCanvas">
<Canvas.RenderTransform>
<CompositeTransform x:Name="CanvasRenderTransform" />
</Canvas.RenderTransform>
在C#中我已經定義在哪裏存儲初始規模,並修改它,因爲它被夾住如下:
private void GestureListener_DragDelta(object sender, DragDeltaGestureEventArgs e)
{
Point p = e.GetPosition(GameCanvas);
CanvasRenderTransform.TranslateX = p.X - originDragPoint.X;
CanvasRenderTransform.TranslateY = p.Y - originDragPoint.Y;
}
private void GestureListener_DragStarted(object sender, DragStartedGestureEventArgs e)
{
originDragPoint = e.GetPosition(GameCanvas);
}
任何人都得到一個線索爲什麼當我移動它時閃爍並且移動很差?