Skip to content

[Win32/macOS] WebView2 resizing issues #21810

Closed

Description

@ZedDevStuff

Current behavior 🐛

Given the following MainPage

public sealed partial class MainPage : Page
{
    public MainPage()
    {
        this
            .Background(ThemeResource.Get<Brush>("ApplicationPageBackgroundThemeBrush"))
            .Content(new WebView2()
                .VerticalAlignment(VerticalAlignment.Stretch)
                .HorizontalAlignment(HorizontalAlignment.Stretch)
                .Source(new Uri("https://github.com/unoplatform/uno")));
    }
}

The WebView will always stay the same size no matter what happens to the window. Manually changing the size will provide the same result (nothing)

Image

Expected behavior 🎯

The WebView changes size accordingly

How to reproduce it (as minimally and precisely as possible) 🔬

Fresh Uno project using the latest stable SDK with the only modification being the addition WebView feature and the previously shown MainPage (using C# markup but it should eb the same with XAML)

Workaround 🛠️

Switching the SDK to 6.4.0-dev.79 for example produces the expected result. I didn't test other versions so i'm not sure when this issue first appeared

Renderer 🎨

  • Skia
  • Native

Affected platforms 📱💻🖥️

Desktop (Windows)

Uno.Sdk version (and other relevant versions) 📦

6.4.13

IDE version 🧑‍💻

Visual Studio 2026 18.0.0

Anything else we need to know? 💬

Could be reproed with e.g.:

UnoWeb.zip

Activity

  1. added theissue type on Nov 11, 2025
  2. added
    triage/untriaged
    difficulty/tbd
    on Nov 11, 2025
  3. DevTKSS commented on Nov 12, 2025

    @DevTKSS
    Contributor

    👍 still works with 6.4.0-dev.51 using xaml + mvux

    <WebView2 x:Name="MyWebView2"
              Grid.Column="1"
              Grid.ColumnSpan="2"
              Grid.Row="2"
              Source="{Binding Path=CurrentUrl, Mode=TwoWay}" />
  4. changed the title [-]WebView can't resize[/-] [+][C#M] `WebView2` can't resize[/+] on Nov 16, 2025
  5. changed the title [-][C#M] `WebView2` can't resize[/-] [+][C#M] `WebView2` can't resize on Win32[/+] on Nov 16, 2025
  6. morning4coffe-dev commented on Nov 16, 2025

    @morning4coffe-dev
    Member

    Tested this with multiple configurations, it seems to be indeed related to C# Markup, I can't reproduce this issue with similar UI with XAML.

  7. DevTKSS commented on Nov 17, 2025

    @DevTKSS
    Contributor
  8. changed the title [-][C#M] `WebView2` can't resize on Win32[/-] [+][Win32/macOS] `WebView2` resizing issues[/+] on Nov 23, 2025
  9. morning4coffe-dev commented on Nov 23, 2025

    @morning4coffe-dev
    Member

    While working on this, I have noticed a similar issue on macOS with different UI layout:

    Screen.Recording.2025-11-23.at.17.01.35.mov
  10. added
    area/webview
    difficulty/medium 🤔
    and removed
    triage/untriaged
    difficulty/tbd
    on Nov 25, 2025
  11. github-actions commented on Apr 30, 2026

    @github-actions
    Contributor

    This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or feature requests.

  12. locked as resolved and limited conversation to collaborators on Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/webviewdifficulty/medium 🤔

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions