Skip to content

Commit 6f03977

Browse files
committed
Fixes #1070
1 parent 1c604a6 commit 6f03977

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
- [#1035](../../issues/1035) - Binding failures from within RibbonTabItem on IsMinimized & IsOpen
2828
- [#1041](../../issues/1041) - MenuItem CreateQuickAccessItem should create ToggleButton (thanks @andersforsgren)
29+
- [#1070](../../issues/1070) - Separators no longer shown in Backstage (related to #936)
2930

3031
- ### Enhancements/Features
3132

Fluent.Ribbon.Showcase/TestContent.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272
</TabControl>
273273
</Fluent:BackstageTabItem>
274274

275-
<Fluent:SeparatorTabItem />
275+
<Separator />
276276

277277
<Fluent:Button Header="Exit"
278278
VerticalAlignment="Bottom"

Fluent.Ribbon/Controls/BackstageTabControl.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,17 @@ or SeparatorTabItem
333333
or Separator;
334334
}
335335

336+
/// <inheritdoc />
337+
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
338+
{
339+
if (element.ReadLocalValue(DockPanel.DockProperty) == DependencyProperty.UnsetValue)
340+
{
341+
element.SetCurrentValue(DockPanel.DockProperty, Dock.Top);
342+
}
343+
344+
base.PrepareContainerForItemOverride(element, item);
345+
}
346+
336347
/// <inheritdoc />
337348
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
338349
{

Fluent.Ribbon/Themes/Controls/BackstageTabControl.xaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656

5757
<Style x:Key="Fluent.Ribbon.Styles.BackstageTabControl.Button"
5858
TargetType="{x:Type Fluent:Button}">
59-
<Setter Property="DockPanel.Dock" Value="Top" />
6059
<Setter Property="Fluent:RibbonProperties.IconSize" Value="Small" />
6160
<Setter Property="Fluent:RibbonProperties.MouseOverBackground" Value="{DynamicResource Fluent.Ribbon.Brushes.BackstageTabItem.MouseOver.Background}" />
6261
<Setter Property="FocusVisualStyle" Value="{DynamicResource Fluent.Ribbon.Styles.ControlStyleEmptyFocus}" />
@@ -115,7 +114,6 @@
115114
<Style x:Key="Fluent.Ribbon.Styles.BackstageBackButton"
116115
TargetType="{x:Type Button}">
117116
<Setter Property="Background" Value="{DynamicResource Fluent.Ribbon.Brushes.Backstage.BackButton.Background}" />
118-
<Setter Property="DockPanel.Dock" Value="Top" />
119117
<Setter Property="FocusVisualStyle" Value="{DynamicResource Fluent.Ribbon.Styles.ControlStyleEmptyFocus}" />
120118
<Setter Property="Foreground" Value="{DynamicResource Fluent.Ribbon.Brushes.Backstage.BackButton.Foreground}" />
121119
<Setter Property="Height" Value="48" />
@@ -125,7 +123,6 @@
125123

126124
<Style x:Key="Fluent.Ribbon.Styles.BackstageTabControl.SeparatorTabItem"
127125
TargetType="{x:Type Fluent:SeparatorTabItem}">
128-
<Setter Property="DockPanel.Dock" Value="Top" />
129126
<Setter Property="Focusable" Value="False" />
130127
<Setter Property="Margin" Value="25 10 20 10" />
131128
<Setter Property="Template">

Fluent.Ribbon/Themes/Controls/BackstageTabItem.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
<Style x:Key="Fluent.Ribbon.Styles.BackstageTabItem"
6262
TargetType="{x:Type Fluent:BackstageTabItem}">
6363
<Setter Property="Background" Value="{Binding Background, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:BackstageTabControl}}}" />
64-
<Setter Property="DockPanel.Dock" Value="Top" />
6564
<Setter Property="Fluent:RibbonProperties.IsSelectedBackground" Value="{DynamicResource Fluent.Ribbon.Brushes.BackstageTabItem.Selected.Background}" />
6665
<Setter Property="Fluent:RibbonProperties.MouseOverBackground" Value="{DynamicResource Fluent.Ribbon.Brushes.BackstageTabItem.MouseOver.Background}" />
6766
<Setter Property="FocusVisualStyle" Value="{DynamicResource Fluent.Ribbon.Styles.ControlStyleEmptyFocus}" />

0 commit comments

Comments
 (0)