Windows icon indicating copy to clipboard operation
Windows copied to clipboard

Add migration samples for `AdaptiveGridView` (i.e. samples showing similar layout with `ItemsRepeater`)

Open michael-hawker opened this issue 2 years ago • 3 comments

Snippet I had mocked up a while back:

    <Page.Resources>
        <converters:StringFormatConverter x:Key="StringFormatConverter"/>
    </Page.Resources>

    <ScrollViewer HorizontalScrollMode="Disabled"
                    VerticalScrollMode="Enabled"
                    VerticalScrollBarVisibility="Auto" Margin="20">
        <muxc:ItemsRepeater 
            ItemsSource="{Binding}">
            <muxc:ItemsRepeater.Layout>
                <muxc:UniformGridLayout Orientation="Horizontal" 
                                        MinItemWidth="200" MinItemHeight="200"
                                        MinRowSpacing="16" MinColumnSpacing="8"
                                        ItemsStretch="Uniform"
                                        />
            </muxc:ItemsRepeater.Layout>
            <muxc:ItemsRepeater.ItemTemplate>
                <DataTemplate>
                    <Grid>
                        <Image Source="{Binding id, Converter={StaticResource StringFormatConverter}, ConverterParameter='https://picsum.photos/id/{0}0/200/200'}" Stretch="UniformToFill"/>
                        <Border Background="#99FFFFFF" VerticalAlignment="Bottom">
                            <TextBlock Text="{Binding title}" TextWrapping="WrapWholeWords"
                                    Foreground="Black" Margin="4"/>
                        </Border>
                    </Grid>
                </DataTemplate>
            </muxc:ItemsRepeater.ItemTemplate>
        </muxc:ItemsRepeater>
    </ScrollViewer>

michael-hawker avatar Jul 11 '23 16:07 michael-hawker

Has there been any progress on this? I am using AdaptiveGridView in my app and using ItemsRepeater isn't an option because I couldn't find built-in support for selection, clicks etc. Would be interested in how this can be replicated with an ItemsRepeater. Can't migrate to v8 until this is possible

tipa avatar Nov 10 '23 12:11 tipa

Has there been any progress on this? I am using AdaptiveGridView in my app and using ItemsRepeater isn't an option because I couldn't find built-in support for selection, clicks etc. Would be interested in how this can be replicated with an ItemsRepeater. Can't migrate to v8 until this is possible

Yes, exactly. ItemsRepeater seems missing handful features from (adpative)gridview. The only way to migrate is to write your own adaptive gridview. Which won't be that hard.

JimmyRespawn avatar Jul 09 '24 01:07 JimmyRespawn