-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[regression/8.0.3] Flickering occurs due to padding while navigating pages. #18875
Description
Description
Hi,
I prepared an example project to describe the bug. The bug happens when navigating pages. The imagebutton component first shows the full scale image without considering the padding property for a couple of frames. Then, the image is drawn correctly considering the padding property. The bug happens in both debug and release mode.
x.mp4
The only code added to the project is:
In the MainPage.xaml:
<ImageButton
Source="dotnet_bot.png"
HeightRequest="100"
WidthRequest="100"
Padding="50"
BackgroundColor="Yellow"
/>
In the MainPage.cs:
private void OnCounterClicked(object sender, EventArgs e)
{
count++;
if (count == 1)
CounterBtn.Text = $"Clicked {count} time";
else
CounterBtn.Text = $"Clicked {count} times";
SemanticScreenReader.Announce(CounterBtn.Text);
Navigation.PushAsync(new MainPage(), false);
}
Other than that, there is another bug with the padding property however it is being tracked in a different issue.
EDIT - Another bug: "When I click previous button to go to the previous page, the imagebutton in the previous page is rendered wrong. It does not consider any padding anymore."
Steps to Reproduce
- Create a new maui project (.NET 8 Android)
- Add one imagebutton as described.
- Add navigation code.
- Run the project.
- Navigate pages.
- Flickering happens.
Link to public reproduction project repository
No response
Version with bug
8.0.3
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
Unknown/Other
Affected platforms
Android, I was not able test on other platforms
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response