wpf icon indicating copy to clipboard operation
wpf copied to clipboard

WPF Fluent Theme TextBox component in .NET 10 has different default height

Open eschgi opened this issue 10 months ago • 1 comments

Description

Hi,

we upgraded our WPF application (which is a WiX setup bootstrapper) from .NET 9 to .NET 10. We are using the fluent ui theme (ThemeMode="Dark").

We have seen that after the upgrade the TextBox heights have changed and the text is also not completely vertically centered anymore.

Was this change planned or is this for you also a bug?

Thanks in the meantime.

Reproduction Steps

With this XAML code, you should be able to reproduce the bug:

XAML code

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>
    <TextBlock 
        Grid.Row="0" 
        TextWrapping="Wrap" 
        Text="Test:" />
    <TextBox 
        Grid.Row="1"
        Width="200"
        HorizontalAlignment="Left"
        Text="123" />
</Grid>

Expected behavior

I expect that the TextBox text is centered vertically. I also expect, when I change the height of the TextBox component to a smaller height than the default height, that the height I have set is applied correctly.

Compiled with .NET 9:

Image

Actual behavior

Compiled with .NET 10:

Image

Regression?

In .NET 9 it works for us, in .NET 10 not anymore.

Known Workarounds

Use .NET 9 instead.

Impact

Minimal.

Configuration

No response

Other information

No response

eschgi avatar Jan 16 '26 10:01 eschgi

@eschgi we have changed the defaults of certain controls in .NET 10 to maintain consistency with other controls. This is a know by-product of the same.

harshit7962 avatar Jan 19 '26 05:01 harshit7962