Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WinUI 3 controls in Simple Island App are invisible until focused #320

Open
litherum opened this issue Nov 26, 2023 · 1 comment
Open

WinUI 3 controls in Simple Island App are invisible until focused #320

litherum opened this issue Nov 26, 2023 · 1 comment

Comments

@litherum
Copy link

litherum commented Nov 26, 2023

Building and running the unmodified Simple Island App project results in a window that looks like this:

Screenshot 2023-11-26 142726

However, there are suposed to be WinUI 3 controls on the top and bottom of the WebView2. The XAML has:

    <Grid Padding="10">
        <Grid.RowDefinitions>
            <RowDefinition Height="50"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="50"/>
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Grid.Row="0">
            <Button x:Name="Button" Click="ClickHandler">Click Me</Button>
            <TextBox Text="Text goes here" Margin="10" />
        </StackPanel>
        <WebView2 Grid.Row="1" Source="http://bing.com" />
        <Button Grid.Row="2">Last Button</Button>
    </Grid>

So there are supposed to be a Button and TextBox above the WebView2, and another Button below it.

If you click where the TextBox control is supposed to be, it shows up:

Screenshot 2023-11-26 143327

But then if you click away from it, it disappears again.

I'm using Windows 11 23H2, Windows 11 SDK 10.0.22000.0, Visual Studio 17.8.1, and Windows App SDK 1.4.3 (1.4.231115000).

@edward-a
Copy link

I suppose i am pretty late to add to this issue. Anyway, I stumbled upon this as well and as it appears the reason for that is the Windows' dark theme that makes controls' background transparent. So, i guess that's by design and the fix is to make the background behind controls dark.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants