dotMorten / WinUIEx

WinUI Extensions
https://dotmorten.github.io/WinUIEx
MIT License
602 stars 38 forks source link

Problems with content stretching in WindowEx #16

Closed byrialsen closed 2 years ago

byrialsen commented 2 years ago

Hi Morten.

Really cool you made this available via NuGet. 💪

I just tried it out and believe there is a problem to the WindowsEx and content stretching. Try this very simple standard WinUi Window. This shows a window with completely purple background.

<Window
    x:Class="WinUIExTest.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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="Purple">
        <StackPanel
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            Orientation="Horizontal">
            <Button x:Name="myButton" Click="myButton_Click">Click Me</Button>
        </StackPanel>
    </Grid>
</Window>

If you change Window to WindowEx you get this:

image