You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the new .NET 9 Fluent theme, setting setting e.g. font weight on a TextBlock will cause its tooltip to have the same style. This is of course undesirable. It could be that other controls are affected as well, I have only tested with TextBlock.
Reproduction Steps
Create a .NET 9 WPF application
Change the MainWindow.xaml like so:
<Windowx:Class="ScrollViewerTextWrapping.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft.com/expression/blend/2008"xmlns:local="clr-namespace:ScrollViewerTextWrapping"xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"Title="MainWindow"Width="400"Height="200"ThemeMode="Light"WindowStartupLocation="CenterScreen"mc:Ignorable="d">
<Grid>
<TextBlockHorizontalAlignment="Center"VerticalAlignment="Center"FontWeight="Bold"ToolTip="This is a tooltip">
This is not a tooltip
</TextBlock>
</Grid>
</Window>
Expected behavior
ToolTip styling is independent of TextBlock.
Actual behavior
ToolTip styling "inherits" from TextBlock.
Regression?
Prior versions of .NET as well as .NET 9 when not using the Fluent theme does not exhibit this issue.
Known Workarounds
Introducing a nested Run element with the style, like so:
<TextBlockHorizontalAlignment="Center"VerticalAlignment="Center"ToolTip="This is a tooltip">
<RunFontWeight="Bold">This is not a tooltip</Run>
</TextBlock>
Impact
Degrades UX of tooltips.
Configuration
Property
Value
SDK
.NET 9 RC2
OS Name
Microsoft Windows 11 Pro
Version
10.0.22631 Build 22631
System SKU
Surface_Pro_8_1983
Other information
No response
The text was updated successfully, but these errors were encountered:
bent-rasmussen
changed the title
Fluent Theme: Tooltip inherits style from TextBlock
Fluent Theme: ToolTip inherits style from TextBlockOct 17, 2024
Description
In the new .NET 9 Fluent theme, setting setting e.g. font weight on a
TextBlock
will cause its tooltip to have the same style. This is of course undesirable. It could be that other controls are affected as well, I have only tested withTextBlock
.Reproduction Steps
MainWindow.xaml
like so:Expected behavior
ToolTip
styling is independent ofTextBlock
.Actual behavior
ToolTip
styling "inherits" fromTextBlock
.Regression?
Prior versions of .NET as well as .NET 9 when not using the Fluent theme does not exhibit this issue.
Known Workarounds
Introducing a nested
Run
element with the style, like so:Impact
Degrades UX of tooltips.
Configuration
Other information
No response
The text was updated successfully, but these errors were encountered: