Hello,
For adapting screen widths, you can use the official API provided by MAUI to achieve this requirement.
Please refer to the code snippets and documentation below.
public partial class TestPop : Popup
{
public TestPop()
{
InitializeComponent();
// layout is the name given to the control by x:Name
layout.WidthRequest = DeviceDisplay.Current.MainDisplayInfo.Width;
}
}
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.