Skip to content

Commit

Permalink
Fixes #883 by adding IsGrouped to Gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
batzen committed Dec 16, 2020
1 parent 45426cb commit c4cfb87
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

- [#877](../../issues/877) - Titlebar and Quick-Access broken when using StartScreen
- [#881](../../issues/881) - Quick Access Toolbar: Drop Down Arrow not Visible
- [#883](../../issues/883) - GroupBy not working anymore on Fluent:Gallery?
Added `IsGrouped` to `Gallery`.

## 8.0.2

Expand Down
1 change: 1 addition & 0 deletions Fluent.Ribbon.Showcase/TestContent.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ Pellentesque nec dolor sed lacus tristique rutrum sed vitae urna. Sed eu pharetr
VerticalAlignment="Top">
<Fluent:Gallery SelectedFilter="{Binding ElementName=galleryFilterAll3}"
GroupBy="Tag"
IsGrouped="True"
x:Name="WatermarkGallery"
MinItemsInRow="1"
MaxItemsInRow="3"
Expand Down
17 changes: 17 additions & 0 deletions Fluent.Ribbon/Controls/Gallery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,23 @@ public int MaxItemsInRow

#endregion

#region IsGrouped

/// <summary>Identifies the <see cref="IsGrouped"/> dependency property.</summary>
public static readonly DependencyProperty IsGroupedProperty = DependencyProperty.Register(nameof(IsGrouped), typeof(bool), typeof(Gallery), new PropertyMetadata(BooleanBoxes.FalseBox));

/// <summary>
/// Gets or sets whether the inner gallery panel shows groups
/// (Filter property still works as usual)
/// </summary>
public bool IsGrouped
{
get { return (bool)this.GetValue(IsGroupedProperty); }
set { this.SetValue(IsGroupedProperty, value); }
}

#endregion

#region GroupBy

/// <summary>
Expand Down
1 change: 1 addition & 0 deletions Fluent.Ribbon/Themes/Controls/Gallery.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
MinItemsInRow="{TemplateBinding MinItemsInRow}"
MaxItemsInRow="{TemplateBinding MaxItemsInRow}"
Filter="{TemplateBinding SelectedFilterGroups}"
IsGrouped="{TemplateBinding IsGrouped}"
GroupBy="{TemplateBinding GroupBy}"
GroupByAdvanced="{TemplateBinding GroupByAdvanced}"
IsItemsHost="True"
Expand Down

0 comments on commit c4cfb87

Please sign in to comment.