Dim ReverseFix As Int = IIf(mReverse, -1, 1) '<------------------
ImageView1.SetLayoutAnimated(0, 0, h, ivwidth, ivheight)
ImageView2.SetLayoutAnimated(0, ReverseFix * (ivwidth + Gap), h, ivwidth, ivheight)
If ivwidth <= mBase.Width Then
ImageView2.Visible = False
Else
ImageView2.Visible = True
Dim MyIndex As Int = LoopIndex
Dim duration As Int = ivwidth / WidthPerSecond * 1000
Sleep(StartPositionDelay)
If MyIndex <> LoopIndex Then Return
Do While True
ImageView1.SetLayoutAnimated(duration, ReverseFix * (-ivwidth - Gap), ImageView1.Top, ImageView1.Width, ImageView1.Height)
ImageView2.SetLayoutAnimated(duration, 0, ImageView1.Top, ImageView1.Width, ImageView1.Height)
Sleep(duration)
If MyIndex <> LoopIndex Then Return
Sleep(StartPositionDelay)
If MyIndex <> LoopIndex Then Return
ImageView1.SetLayoutAnimated(0, 0, h, ivwidth, ivheight)
ImageView2.SetLayoutAnimated(0, ReverseFix * (ivwidth + Gap), h, ivwidth, ivheight)
Loop
End If