Skip to content

Commit

Permalink
Only show header/footer if not null AND visible
Browse files Browse the repository at this point in the history
  • Loading branch information
Redth committed Aug 19, 2023
1 parent 0e1f96c commit 2734c19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions VirtualListView/PositionalViewSelector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ internal class PositionalViewSelector
public readonly IVirtualListView VirtualListView;
public IVirtualListViewAdapter Adapter => VirtualListView?.Adapter;
public IVirtualListViewSelector ViewSelector => VirtualListView?.ViewSelector;
public bool HasGlobalHeader => VirtualListView?.Header != null;
public bool HasGlobalFooter => VirtualListView?.Footer != null;
public bool HasGlobalHeader => (VirtualListView?.Header?.Visibility ?? Visibility.Collapsed) == Visibility.Visible;
public bool HasGlobalFooter => (VirtualListView?.Footer?.Visibility ?? Visibility.Collapsed) == Visibility.Visible;

public PositionalViewSelector(IVirtualListView virtualListView)
{
Expand Down

0 comments on commit 2734c19

Please sign in to comment.