RadLoopingList supports defining different centering positions for the selected
item when the IsCentered property is set to true.
This is done via the CenteredItemSnapPosition property.
Using the CenteredItemSnapPosition property
The CenteredItemSnapPosition property accepts the following values:
Middle is the default value and it implies that the
selected item is positioned in the center of the viewport
Near implies that the
selected item is positioned at the near viewport edge of RadLoopingList. In horizontal scrolling mode
that means at the left side of the control, whereas in vertical scrolling mode that means
at the top edge of the viewport.
Far implies that the
selected item is positioned at the far viewport edge of RadLoopingList. In horizontal scrolling mode
that means at the right side of the control, whereas in vertical scrolling mode that means
at the bottom edge of the viewport.
The SnapOffsetCorrection property
RadLoopingList exposes the SnapOffsetCorrection property which accepts double values
and defines the offset correction applied to the selected item when it is snapped.
For instance, when the CenteredItemSnapPosition property is set to Far and
the SnapOffsetCorrection property is set to -15, the selected item will be snapped
to the far edge of the viewport and then a correction of 15 pixels off the new scroll position will be made.
|The SnapOffsetCorrection is applicable only when the IsCentered property
of RadLoopingList is set to true.|
The following picture illustrates how the selected item is positioned when the CenteredItemSnapPosition
is set to Far and the SnapOffsetCorrection is set to -15: