02-20-2013 04:58 AM
How to change scrollViewProperties scrollMode from vertical to horizontal if screen orientation change from portrait to landscape?
I try like this but not work
OrientationHandler {
onOrientationAboutToChange: {
if (orientation == UIOrientation.Landscape)
scrollViewId.scrollMode = ScrollMode.Horizontal; // scrollViewId -> id of scrollView
else
scrollViewId.scrollMode = ScrollMode.Vertical;
}
}
Thanks
Solved! Go to Solution.
02-22-2013 03:06 AM
Hi I changed the code like this and work
OrientationHandler {
onOrientationAboutToChange: {
if (orientation == UIOrientation.Landscape)
scrollViewId.scrollViewProperties.scrollMode = ScrollMode.Horizontal;
else
scrollViewId.scrollViewProperties.scrollMode = ScrollMode.Vertical;
}
}