fluentribbon / Fluent.Ribbon

WPF Ribbon control like in Office
http://fluentribbon.github.io
MIT License
2.55k stars 517 forks source link

Order contents in a Gallery vertically instead of horizontally? #1080

Closed DaveInCaz closed 6 months ago

DaveInCaz commented 2 years ago

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

batzen commented 2 years ago

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 commented 6 months ago

Closing because no one seems interested in helping with this.