Navigate pagecontrol with JS

I have a pagecontrol which I do not want to navigate with swipe gestures. Each page is dynamically added, so it seems that I cannot bind to ux:Name. Ay tips on navigate back and forth between cards using JS? Example taken from “swipe gesture reveale”

        <Panel>
			<PageControl InactiveState="Unchanged" Transition="None">
				<NavigationMotion GotoEasing="QuadraticOut" GotoDuration="0.3" />
				<Each Items="{pagesView}">
					<Card />
				</Each>
			</PageControl>
		</Panel>

Solution is to bind against pagecontrol’s ActiveIndex property