Fluent.Ribbon
Fluent.Ribbon copied to clipboard
Order contents in a Gallery vertically instead of horizontally?
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
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.
Closing because no one seems interested in helping with this.