Skip to content

Commit

Permalink
Merge pull request #1181 from nishy2000/issue-1180-Padding-BorderBrus…
Browse files Browse the repository at this point in the history
…h-in-Gallery

fix: #1180 Padding and BorderBrush do not work
  • Loading branch information
batzen authored Nov 25, 2023
2 parents 7f204b6 + 5ec2e8b commit 403cdb6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Fluent.Ribbon/Themes/Controls/Gallery.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
</ResourceDictionary>
</ControlTemplate.Resources>
<Border x:Name="layoutRoot"
BorderBrush="{DynamicResource Fluent.Ribbon.Brushes.Control.Border}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<Grid Width="Auto">
<Grid.RowDefinitions>
Expand All @@ -126,7 +126,6 @@
<ScrollViewer x:Name="scrollViewer"
Grid.Row="1"
Grid.RowSpan="1"
Margin="1"
Focusable="False">
<Fluent:GalleryPanel Background="{DynamicResource Fluent.Ribbon.Brushes.White}"
Filter="{TemplateBinding SelectedFilterGroups}"
Expand All @@ -137,6 +136,7 @@
ItemContainerGenerator="{Binding ItemContainerGenerator, RelativeSource={RelativeSource TemplatedParent}}"
ItemHeight="{TemplateBinding ItemHeight}"
ItemWidth="{TemplateBinding ItemWidth}"
Margin="{TemplateBinding Padding}"
MaxItemsInRow="{TemplateBinding MaxItemsInRow}"
MinItemsInRow="{TemplateBinding MinItemsInRow}"
Orientation="{TemplateBinding Orientation}" />
Expand All @@ -152,8 +152,10 @@

<Style x:Key="Fluent.Ribbon.Styles.Gallery"
TargetType="{x:Type Fluent:Gallery}">
<Setter Property="BorderBrush" Value="{DynamicResource Fluent.Ribbon.Brushes.Control.Border}" />
<Setter Property="BorderThickness" Value="0 0 0 1" />
<Setter Property="Margin" Value="0" />
<Setter Property="Padding" Value="1" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="Template" Value="{DynamicResource Fluent.Ribbon.Templates.Gallery}" />
Expand Down

0 comments on commit 403cdb6

Please sign in to comment.