CommunityToolkit / CommunityToolkit/Maui

[BUG] Padding and Margin are not applied to the Popup class of Popup2 by Style attribute

Open
#2,747 6 comments 2 reactions 0 assignees View on GitHub
bug unverified
Dominant language
C#
Stars
2.7k
Forks
500
Avg merge
2d 14h
Merged PRs (30d)
7

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

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

- [x] I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug

### Current Behavior

Margin and Padding are not applied to Popup in the Style attribute.
Property, the value is applied.

### Expected Behavior

Margin and Padding are applied in the Style attribute as well as in the property.

### Steps To Reproduce

1. Create a Style to be applied to the Popup and set Padding and Margin.
2. Apply Style to Popup

## by Style

```xml




<Setter Property="Padding" Value="0" />
<Setter Property="Margin" Value="0" />
<Setter Property="BackgroundColor" Value="Blue" />




```

![Image](https://github.com/user-attachments/assets/df530484-388a-4145-aaa8-61cd0973634a)

* by Property

```xml



```

![Image](https://github.com/user-attachments/assets/f6ac068b-8909-4317-9314-4ad633be0d27)

### Link to public reproduction project repository

https://github.com/usausa/Issue-CommunityToolkitMaui-Popup2

### Environment

```markdown
- .NET MAUI CommunityToolkit: 12.0.0
- OS: Android
- .NET MAUI: 9.0.80
```

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.