Skip to content

[BUG] Regression in 14.0.0: DefaultPopupSettings Broken for Padding + Margin #3064

@dartasen

Description

@dartasen

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

I use popup in my application with the IPopupService, after upgrading to the latest version of the toolkit they don't behave the same.

Padding and margin seems broken (Defaults are set in MauiProgram). Whether I set it in the popup xaml or in the PopupDefault.

Screenshots are from an Android 16 Device (Pixel 9a), but can repro as well on iOS 18.4 & 26

Toolkit 13 :
Image

Toolkit 14 :

Image

Expected Behavior

Works as previous version

Steps To Reproduce

.UseMauiCommunityToolkit(static options =>
{
 options.SetPopupOptionsDefaults(new DefaultPopupOptionsSettings()
 {
     CanBeDismissedByTappingOutsideOfPopup = false,
     PageOverlayColor = Color.FromRgba(0, 0, 0, 200),
     Shape = new RoundRectangle()
     {
         CornerRadius = new CornerRadius(20, 20, 20, 20),
         StrokeThickness = 0d
     },
     Shadow = null,
     OnTappingOutsideOfPopup = null
 });

 options.SetPopupDefaults(new DefaultPopupSettings()
 {
     CanBeDismissedByTappingOutsideOfPopup = false,
     BackgroundColor = Color.FromArgb("22314E"),
     HorizontalOptions = LayoutOptions.Center,
     VerticalOptions = LayoutOptions.Center,
     Margin = new Thickness(12),
     Padding = new Thickness(10)
 });
})

Note : Margin/Padding doesn't apply if adding those properties to the popup xaml

  • Using toolkit 13, display a popup with Margin/Padding
  • Upgrade to toolkit 14, same popup layout will break

Link to public reproduction project repository

N/A

Environment

- .NET MAUI CommunityToolkit: 14.0.0
- OS: Windows 11
- .NET MAUI: 10.0.31

Anything else?

No response

Metadata

Metadata

Labels

bugSomething isn't workingneeds discussionDiscuss it on the next Monthly standup

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions