Skip to content

ScrollHeader inside grouped ListViewΒ #1446

@gillesbergerp

Description

@gillesbergerp

When using ScrollHeader with Mode="Sticky" inside a ListView with grouped items, the groups' headers are displayed in front of the header.

Example

<ListView x:Name="lv" ItemsSource="{Binding Source={StaticResource cvs}}" SelectionMode="None">
    <ListView.Header>
        <controls:ScrollHeader Mode="Sticky" TargetListViewBase="{x:Bind lv,Mode=OneWay}">
            <Grid Height="200">
                <Grid.Background>
                    <SolidColorBrush Opacity="0.9" Color="Blue"/>
                </Grid.Background>
                <TextBlock Foreground="White" Text="header" FontSize="20" VerticalAlignment="Center"/>
            </Grid>
        </controls:ScrollHeader>
    </ListView.Header>
    <ListView.GroupStyle>
        <GroupStyle>
            <GroupStyle.HeaderTemplate>
                <DataTemplate>
                    <Grid>
                       <TextBlock Text="{Binding Key}"/>
                   </Grid>
               </DataTemplate>
           </GroupStyle.HeaderTemplate>
       </GroupStyle>
   </ListView.GroupStyle>
</ListView>

Where cvs is a CollectionViewSource with IsSourceGrouped set to True.

Result

unbenannt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug πŸ›An unexpected issue that highlights incorrect behaviorcontrols πŸŽ›οΈhelp wantedIssues identified as good community contribution opportunities

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions