To reproduce:
- Crete a self-reference hiearchy and show the grid lines.
- Start the application expand some rows scroll to the bottom and then scroll to the right.
- The issue is easily reproducible with the example from the documentation.
Workaround:
class MyDataCellElement : GridDataCellElement
{
public MyDataCellElement(GridViewColumn col, GridRowElement row) : base(col, row)
{
}
protected override SizeF ArrangeOverride(SizeF finalSize)
{
SelfReferenceCellLayout selfReferenceLayout = this.SelfReferenceLayout;
if (selfReferenceLayout != null)
{
GridDataRowElement dataRowElement = this.RowElement as GridDataRowElement;
if (dataRowElement != null && this.ColumnInfo.OwnerTemplate != null)
{
dataRowElement.SelfReferenceLayout.StackLayoutElement.Visibility = ElementVisibility.Visible;
}
}
else
{
GridDataRowElement dataRowElement = this.RowElement as GridDataRowElement;
if (dataRowElement != null && this.ColumnInfo.OwnerTemplate != null)
{
dataRowElement.SelfReferenceLayout.StackLayoutElement.Visibility = ElementVisibility.Collapsed;
}
}
return base.ArrangeOverride(finalSize);
}
protected override Type ThemeEffectiveType
{
get
{
return typeof(GridDataCellElement);
}
}
}