private void moveCanvas(int direction)
{
double currentLeft = Canvas.GetLeft(timelineCanvas);
double newLeft = 0;
double rightBound = -1800;
double leftBound = 0;
if (direction == -1)
{
newLeft = currentLeft + 964;
if (newLeft > leftBound)
{
newLeft = leftBound;
}
}
else if (direction == 1)
{
newLeft = currentLeft - 964;
if (newLeft < rightBound)
{
newLeft = rightBound;
}
}
Canvas.SetLeft(timelineCanvas, newLeft);
Canvas.SetLeft(segmentCanvas, newLeft);
}