Transition not working correctly in ListView and GridView (WinUI 3)

youki 1,021 Reputation points
2024-03-20T11:15:31.2233333+00:00

Hello,

the transitions in a bound ListView and GridView are not working correctly, can you confirm this?

(It is unchecked and uncoordinated, items are not added in order, especially when you reload them?)

<ListView.ItemContainerTransitions>
    <TransitionCollection>
        <ContentThemeTransition VerticalOffset="400"/>
        <EntranceThemeTransition FromVerticalOffset="400" IsStaggeringEnabled="False" />
    </TransitionCollection>
</ListView.ItemContainerTransitions>


Info:

It works properly in an ItemsView but this control has a weird behaviour (I assume this is a bug. When I reload it, the checkboxes within the items remain checked.)

<ItemsView.ItemTemplate>
    <DataTemplate x:DataType="local:xxx">
        <ItemContainer HorizontalAlignment="Stretch" Height="40" Background="#232323" x:Name="itemContainer"  Margin="0,5,20,5">
            <ItemContainer.Transitions>
                <TransitionCollection>
                    <ContentThemeTransition VerticalOffset="400"/>
                    <EntranceThemeTransition FromVerticalOffset="400" IsStaggeringEnabled="False"></EntranceThemeTransition>
                </TransitionCollection>
            </ItemContainer.Transitions>
            <StackPanel Orientation="Horizontal">
                <CheckBox Margin="10,0,-80,0" Width="0" MaxWidth="5" IsChecked="{x:Bind xxx}" Checked="cbApplication_Checked" Unchecked="cbApplication_Unchecked"/>
                <Image Height="20" Width="20" Margin="0,0,10,0"  Source="{x:Bind Icon, Mode=OneWay}"/>
                <TextBlock Text="{x:Bind xxx, Mode=OneWay}" TextWrapping="Wrap" FontSize="14" VerticalAlignment="Center"/>
            </StackPanel>
        </ItemContainer>
    </DataTemplate>
</ItemsView.ItemTemplate>

Regards

Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
798 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.