Skip to content

Instantly share code, notes, and snippets.

@smourier
Created March 2, 2020 09:43
Show Gist options
  • Save smourier/de1461daa0f7a7868c03f1eb99a1d069 to your computer and use it in GitHub Desktop.
Save smourier/de1461daa0f7a7868c03f1eb99a1d069 to your computer and use it in GitHub Desktop.
WPF layout bug
<Window
x:Class="WpfApp1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow"
Width="800"
Height="450"
SizeToContent="WidthAndHeight">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<TextBox
Grid.Row="1"
Grid.Column="1"
Text="hello world" />
</Grid>
</Window>
@smourier
Copy link
Author

smourier commented Mar 2, 2020

compile and run, then click on the window border, and observe the layout changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment