Closed
Description
- .NET Core Version: 3.0 preview 5
- Windows version: 1803 build 17134.765
- Does the bug reproduce also in WPF for .NET Framework 4.8?:
I don't know.It works fine on 4.6/4.7 and 4.8
Problem description:
With this XAML:
<Window x:Class="RetailEntertainment.Zorgstand.SignIn.Desktop.Views.AddNewConnectionWindow"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:RetailEntertainment.Zorgstand.SignIn.Desktop.Views"
xmlns:vms="clr-namespace:RetailEntertainment.Zorgstand.SignIn.Desktop.ViewModels"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance vms:AddNewRegistrationDialogViewModel}"
Title="New registration" Width="400" Height="100">
<StackPanel>
<TextBlock Text="Entert the connection string received from the portal:" />
<TextBox Text="{Binding ConnectionString}" />
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<Button Content="Cancel" Margin="4" Padding="2" Command="{Binding CloseDialogCommand}"/>
<Button Content="Save" Margin="4" Padding="2" Command="{Binding TestAndAddRegistrationCommand}"/>
</StackPanel>
</StackPanel>
</Window>
The buttons render wrong after mouse leaves.
Before:

After:

Actual behavior:
It looks like the button renders as if it has its parent size.
After resizing the window, it renders normally again.
Expected behavior:
No weird rendering
Minimal repro:
Code is above