Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,39 @@ void UpdateHeaderFooterHeight(object item, bool isHeader)
size = label.Measure(double.PositiveInfinity, double.PositiveInfinity);
}

var itemHeight = size.Height;
if (IsVerticalItemsLayout())
{
var itemHeight = size.Height;

if (isHeader)
_headerHeight = itemHeight;
else
_footerHeight = itemHeight;
if (isHeader)
{
_headerHeight = itemHeight;
}
else
{
_footerHeight = itemHeight;
}
}
}

bool IsVerticalItemsLayout()
{
if (ItemsView is CollectionView collectionView)
{
switch (collectionView.ItemsLayout)
{
case LinearItemsLayout linearLayout:
{
return linearLayout.Orientation == ItemsLayoutOrientation.Vertical;
}
case GridItemsLayout gridItemsLayout:
{
return gridItemsLayout.Orientation == ItemsLayoutOrientation.Vertical;
}
}
}
// Default
return true;
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading