else if (source.IsGroupFooter(i))
{
//currentGroup.hasFooter = true;
- currentGroup.Count++;
- currentGroup.GroupSize += groupFooterSize;
- Current += groupFooterSize;
+ if (currentGroup != null)
+ {
+ currentGroup.Count++;
+ currentGroup.GroupSize += groupFooterSize;
+ Current += groupFooterSize;
+ }
}
else
{
- currentGroup.Count++;
- int index = i - currentGroup.StartIndex - ((colView.GroupHeaderTemplate != null)? 1: 0);
- if ((index % spanSize) == 0)
+ if (currentGroup != null)
{
- currentGroup.GroupSize += StepCandidate;
- Current += StepCandidate;
+ currentGroup.Count++;
+ int index = i - currentGroup.StartIndex - ((colView.GroupHeaderTemplate != null) ? 1 : 0);
+ if ((index % spanSize) == 0)
+ {
+ currentGroup.GroupSize += StepCandidate;
+ Current += StepCandidate;
+ }
}
}
}
// If the center image is set before, then should update the center visual separately.
if (isCurrentIndicatorCentered)
{
- indicator.URL = circularPaginationStyle.CenterIndicatorImageURL.Selected;
+ indicator.URL = circularPaginationStyle.CenterIndicatorImageURL?.Selected;
}
else
{
// If the center image is set before, then should update the center visual separately.
if (isCurrentIndicatorCentered)
{
- indicator.URL = circularPaginationStyle.CenterIndicatorImageURL.Normal;
+ indicator.URL = circularPaginationStyle.CenterIndicatorImageURL?.Normal;
}
else
{
if (isCenterImageSet && !isSymmetrical && (i == leftIndicatorCount))
{
- newOne.URL = circularPaginationStyle.CenterIndicatorImageURL.Normal;
+ newOne.URL = circularPaginationStyle.CenterIndicatorImageURL?.Normal;
}
else
{
if (isCenterImageSet && (selectedIndex == leftIndicatorCount))
{
- indicatorList[selectedIndex].URL = circularPaginationStyle.CenterIndicatorImageURL.Selected;
+ indicatorList[selectedIndex].URL = circularPaginationStyle.CenterIndicatorImageURL?.Selected;
indicatorList[selectedIndex].Opacity = 1.0f;
}
else
childLayout?.Measure(childWidthMeasureSpec, childHeightMeasureSpec);
- measureSize.width = childLayout.MeasuredWidth.Size.AsRoundedValue();
- measureSize.height = childLayout.MeasuredHeight.Size.AsRoundedValue();
+ measureSize.width = (childLayout == null) ? 0 : MeasuredWidth.Size.AsRoundedValue();
+ measureSize.height = (childLayout == null) ? 0 : MeasuredHeight.Size.AsRoundedValue();
}
void InsertChild(LayoutItem child)
}
else
{
- if (hLocations.Length > maxColumnConut)
+ if (hLocations?.Length > maxColumnConut)
{
widthSize = (int)(hLocations[maxColumnConut] - hLocations[0] - columnSpacing);
}