}
ImageVisual indicator = new ImageVisual
{
- URL = paginationStyle.IndicatorImageUrl.Normal,
+ URL = paginationStyle.IndicatorImageUrl?.Normal,
Size = new Size2D((int)paginationStyle.IndicatorSize.Width, (int)paginationStyle.IndicatorSize.Height),
//TODO: Apply color properties from PaginationStyle class.
MixColor = (indicatorColor == null) ? new Color(1.0f, 1.0f, 1.0f, 0.5f) : indicatorColor,
for (int i = 0; i < indicatorList.Count; i++)
{
ImageVisual indicator = indicatorList[i];
- indicator.URL = paginationStyle.IndicatorImageUrl.Normal;
+ indicator.URL = paginationStyle.IndicatorImageUrl?.Normal;
indicator.Size = new Size2D((int)paginationStyle.IndicatorSize.Width, (int)paginationStyle.IndicatorSize.Height);
indicator.Position = new Vector2((int)(paginationStyle.IndicatorSize.Width + paginationStyle.IndicatorSpacing) * i, 0);
}
ResolveSizeAndState(new LayoutLength(totalHeight), heightMeasureSpec, childHeightState));
// Size of ScrollableBase is changed. Change Page width too.
- scrollableBase.mPageWidth = (int)MeasuredWidth.Size.AsRoundedValue();
- scrollableBase.OnScrollingChildRelayout(null, null);
+ if (scrollableBase != null)
+ {
+ scrollableBase.mPageWidth = (int)MeasuredWidth.Size.AsRoundedValue();
+ scrollableBase.OnScrollingChildRelayout(null, null);
+ }
}
protected override void OnLayout(bool changed, LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom)