Skip to content

Commit

Permalink
Fixes #488 by adding resources to control content border of ribbon
Browse files Browse the repository at this point in the history
You can now use Fluent.Ribbon.Values.RibbonTabControl.Content.BorderThickness to control the thickness of the border around the content area of RibbonTabControl
  • Loading branch information
batzen committed Nov 21, 2017
1 parent 8f1d217 commit a097430
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@
- [#480](../../issues/480) - Disable Scroll Wheel for tab selection
You can control this behavior by using `IsMouseWheelScrollingEnabled` on `Ribbon`
- [#484](../../issues/484) - Add special style/template for MenuItem with set description
- [#488](../../issues/488) - Display border around content area of RibbonTabControl
You can now use `Fluent.Ribbon.Values.RibbonTabControl.Content.BorderThickness` to control the thickness of the border around the content area of `RibbonTabControl`

## 5.0.2
- [#437](../../issues/437) - "Could not load ControlzEx"
Expand Down
1 change: 1 addition & 0 deletions Fluent.Ribbon/Themes/Colors/BaseDark.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.RibbonTabControl.Background" Color="{StaticResource WhiteColor}" options:Freeze="True" />
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.RibbonTabControl.Foreground" Color="{StaticResource BlackColor}" options:Freeze="True" />
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.RibbonTabControl.Content.Background" Color="#363636" options:Freeze="True" />
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.RibbonTabControl.Content.BorderBrush" Color="Transparent" options:Freeze="True" />
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.RibbonTabControl.Content.Foreground" Color="{StaticResource Gray6}" options:Freeze="True" />
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.RibbonTabControl.TabsGrid.Background" Color="Transparent" options:Freeze="True" />
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.RibbonTabControl.TabsGrid.Foreground" Color="{StaticResource BlackColor}" options:Freeze="True" />
Expand Down
1 change: 1 addition & 0 deletions Fluent.Ribbon/Themes/Colors/BaseLight.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.RibbonTabControl.Background" Color="{StaticResource WhiteColor}" options:Freeze="True" />
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.RibbonTabControl.Foreground" Color="{StaticResource BlackColor}" options:Freeze="True" />
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.RibbonTabControl.Content.Background" Color="{StaticResource WhiteColor}" options:Freeze="True" />
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.RibbonTabControl.Content.BorderBrush" Color="Transparent" options:Freeze="True" />
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.RibbonTabControl.Content.Foreground" Color="{StaticResource BlackColor}" options:Freeze="True" />
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.RibbonTabControl.TabsGrid.Background" Color="Transparent" options:Freeze="True" />
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.RibbonTabControl.TabsGrid.Foreground" Color="{StaticResource BlackColor}" options:Freeze="True" />
Expand Down
1 change: 1 addition & 0 deletions Fluent.Ribbon/Themes/Colors/Colors.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.RibbonTabControl.Background" Color="{StaticResource WhiteColor}" options:Freeze="True" />
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.RibbonTabControl.Foreground" Color="{StaticResource BlackColor}" options:Freeze="True" />
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.RibbonTabControl.Content.Background" Color="{StaticResource WhiteColor}" options:Freeze="True" />
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.RibbonTabControl.Content.BorderBrush" Color="Transparent" options:Freeze="True" />
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.RibbonTabControl.Content.Foreground" Color="{StaticResource BlackColor}" options:Freeze="True" />
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.RibbonTabControl.TabsGrid.Background" Color="Transparent" options:Freeze="True" />
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.RibbonTabControl.TabsGrid.Foreground" Color="{StaticResource BlackColor}" options:Freeze="True" />
Expand Down
5 changes: 4 additions & 1 deletion Fluent.Ribbon/Themes/Common.xaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Fluent="clr-namespace:Fluent">
<!-- Set default controls -->
<!-- Set default values -->
<Thickness x:Key="Fluent.Ribbon.Values.RibbonTabControl.Content.BorderThickness">0</Thickness>

<!-- Set default styles -->
<Style TargetType="{x:Type Fluent:Spinner}" BasedOn="{StaticResource SpinnerStyle}" />
<Style TargetType="{x:Type Fluent:TwoLineLabel}" BasedOn="{StaticResource TwoLineLabelStyle}" />
<Style TargetType="{x:Type Fluent:KeyTip}" BasedOn="{StaticResource KeyTipStyle}" />
Expand Down
4 changes: 3 additions & 1 deletion Fluent.Ribbon/Themes/Controls/Ribbon.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
TargetType="{x:Type ContextMenu}" />
</ControlTemplate.Resources>

<Border Background="{TemplateBinding Background}">
<Border Background="{TemplateBinding Background}"
BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="{TemplateBinding BorderBrush}">
<Grid x:Name="PART_LayoutRoot"
Width="Auto"
Height="Auto">
Expand Down
2 changes: 2 additions & 0 deletions Fluent.Ribbon/Themes/Controls/RibbonTabControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@
Grid.Row="1"
Grid.RowSpan="1"
Background="{DynamicResource Fluent.Ribbon.Brushes.RibbonTabControl.Content.Background}"
BorderBrush="{DynamicResource Fluent.Ribbon.Brushes.RibbonTabControl.Content.BorderBrush}"
BorderThickness="{DynamicResource Fluent.Ribbon.Values.RibbonTabControl.Content.BorderThickness}"
TextElement.Foreground="{DynamicResource Fluent.Ribbon.Brushes.RibbonTabControl.Content.Foreground}"
KeyboardNavigation.TabNavigation="Local"
KeyboardNavigation.DirectionalNavigation="Contained"
Expand Down

0 comments on commit a097430

Please sign in to comment.