Fluent.Ribbon icon indicating copy to clipboard operation
Fluent.Ribbon copied to clipboard

Order contents in a Gallery vertically instead of horizontally?

Open DavidHollman opened this issue 3 years ago • 1 comments
trafficstars

I'm using a gallery within a dropdown button as shown below.

The gallery is setup to extend 5 columns horizontally by whatever number of rows is necessary. (Typically a few 100 items total).

By default it inserts items horizontally first, then vertically second. So it would layout something like this:

A B C D E
F G H I J
K L M

Is there any way to get it to go vertically first? Like this:

A D G J M
B E H K
C F I L

Code sample (simplified):

        <Fluent:DropDownButton >

            <Label Content="some text"/>

            <Fluent:Gallery
                ItemsSource="{Binding someItems}"
                MinItemsInRow="1"
                MaxItemsInRow="5"
                >

                <Fluent:Gallery.ItemTemplate>
                    <DataTemplate DataType="{x:Type itemViewModel}">
                        <TextBlock Text="{Binding Name}"/>
                    </DataTemplate>
                </Fluent:Gallery.ItemTemplate>

                <Fluent:Gallery.ItemContainerStyle>
                    <Style TargetType="{x:Type Fluent:GalleryItem}">
                        <Setter Property="Command"... />

                        <Setter Property="CommandParameter" Value="{Binding}" />
                    </Style>
                </Fluent:Gallery.ItemContainerStyle>

            </Fluent:Gallery>
        </Fluent:DropDownButton>

Thanks!


Environment

  • Fluent.Ribbon v9.0.4
  • Windows 10
  • .NET Framework 4.8

DavidHollman avatar Nov 15 '22 13:11 DavidHollman

This is not fully implemented. The panel responsible for rendering the items is UniformGridWithItemSize. If you want to contribute such a feature, i would be happy to review your PR.

batzen avatar Nov 17 '22 14:11 batzen

Closing because no one seems interested in helping with this.

batzen avatar May 01 '24 16:05 batzen