Skip to content

Commit 540ba9b

Browse files
committed
Fixing blurry font for tab content
1 parent e12ff45 commit 540ba9b

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

Fluent.Ribbon/Themes/Controls/RibbonTabControl.xaml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -238,22 +238,29 @@
238238
BorderBrush="{DynamicResource Fluent.Ribbon.Brushes.RibbonTabControl.Content.Border}"
239239
BorderThickness="{DynamicResource Fluent.Ribbon.Values.RibbonTabControl.Content.BorderThickness}"
240240
CornerRadius="{DynamicResource Fluent.Ribbon.Values.RibbonTabControl.Content.CornerRadius}"
241-
Effect="{DynamicResource Fluent.Ribbon.Values.RibbonTabControl.Content.DropShadowEffect}"
242241
KeyboardNavigation.DirectionalNavigation="Contained"
243242
KeyboardNavigation.TabIndex="2"
244243
KeyboardNavigation.TabNavigation="Local"
245244
TextElement.Foreground="{DynamicResource Fluent.Ribbon.Brushes.RibbonTabControl.Content.Foreground}">
246-
<ContentControl x:Name="mainContentControl"
247-
Margin="0"
248-
Focusable="False">
249-
<Fluent:TransitioningControl x:Name="PART_SelectedContent"
250-
HorizontalAlignment="Stretch"
251-
VerticalAlignment="Stretch"
252-
HorizontalContentAlignment="Stretch"
253-
VerticalContentAlignment="Stretch"
254-
NextContent="{Binding SelectedContent, RelativeSource={RelativeSource TemplatedParent}}"
255-
TransitionStoryboard="{DynamicResource Fluent.Ribbon.Storyboards.RibbonTabControl.Content.Transition}" />
256-
</ContentControl>
245+
<Grid>
246+
<Border Background="{DynamicResource Fluent.Ribbon.Brushes.RibbonTabControl.Content.Background}"
247+
BorderBrush="{DynamicResource Fluent.Ribbon.Brushes.RibbonTabControl.Content.Border}"
248+
BorderThickness="0"
249+
CornerRadius="{DynamicResource Fluent.Ribbon.Values.RibbonTabControl.Content.CornerRadius}"
250+
Effect="{DynamicResource Fluent.Ribbon.Values.RibbonTabControl.Content.DropShadowEffect}" />
251+
252+
<ContentControl x:Name="mainContentControl"
253+
Margin="0"
254+
Focusable="False">
255+
<Fluent:TransitioningControl x:Name="PART_SelectedContent"
256+
HorizontalAlignment="Stretch"
257+
VerticalAlignment="Stretch"
258+
HorizontalContentAlignment="Stretch"
259+
VerticalContentAlignment="Stretch"
260+
NextContent="{Binding SelectedContent, RelativeSource={RelativeSource TemplatedParent}}"
261+
TransitionStoryboard="{DynamicResource Fluent.Ribbon.Storyboards.RibbonTabControl.Content.Transition}" />
262+
</ContentControl>
263+
</Grid>
257264
</Border>
258265

259266
<!-- Placement target must be the selected item. Otherwise things like DPI and monitor are selected wrong if the tabcontrol 0,0 is on a different screen than the selected tabs 0,0 -->

0 commit comments

Comments
 (0)