dotnet / dotnet/maui

WinUI: NavigationPage transitions show white window/background behind content

Open
#11,809 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-navigation migration-compatibility platform/windows s/triaged s/verified t/bug
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 14h
Merged PRs (30d)
296

Description

### Description

When using `PushAsync` and `PopAsync` to transition with NavigationPage on Windows 10, a white background appears at the edges of the window where the transition is occurring. This area is always white even when the content page has a different background color or a background image.

![00](https://user-images.githubusercontent.com/44978869/205174517-ebff275d-1c64-4e2b-b017-0fdaf7cd4692.jpg)
![01](https://user-images.githubusercontent.com/44978869/205174530-52cf7149-7f84-4351-87c9-ac0a92a9073f.jpg)

https://user-images.githubusercontent.com/44978869/205174626-1b78a566-0b66-4431-9876-1892136c2070.mp4

### Steps to Reproduce

1. Create a new MAUI app
2. Replace `MainPage = new AppShell()` with `MainPage = new NavigationPage(new MainPage())` in App.xaml.cs
3. Add a second content page and give both pages a background color other than white
4. Write event handlers in the code behind to allow navigating between the two pages with `App.Current.MainPage.Navigation.PushAsync/PopAsync`

Expected behavior: The transition animation is seamless.

Actual behavior: A white background is visible during the transition.

NOTE: The linked repro project is passing `animated: false` to `PushAsync/PopAsync` because of another bug report I'm filing. You can change it to `animated: true`, but the white background is visible either way (due to the other bug).

### Link to public reproduction project repository

https://github.com/ArrowCase/TestMauiTransition

### Version with bug

7.0 (current)

### Last version that worked well

Unknown/Other

### Affected platforms

Windows

### Affected platform versions

Windows SDK 10.0.19041.0

### Did you find any workaround?

None.

### Relevant log output

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the linked TestMauiTransition reproduction on Windows and inspect the NavigationPage behavior around PushAsync and PopAsync, with animated transitions enabled. Compare the transition against pages using non-white background colors or images; done means no white area is visible at the window edges during navigation.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.