question

StefanBauerfeindt-6476 avatar image
0 Votes"
StefanBauerfeindt-6476 asked AlexChuchko-7920 answered

Xamarin.CommunityToolkit Popup Android and IOS Padding problem

Dear all,

i write a simple popup menu with Xamarin.CommunityToolkit on left site the text without Padding works fine... but on IOS i want disable the border, can anyone help to solve this problem

<?xml version="1.0" encoding="utf-8" ?>
<xct:Popup xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:xct="clr-namespace:Xamarin.CommunityToolkit.UI.Views;assembly=Xamarin.CommunityToolkit"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TestPage">
<xct:Popup.Content>
<StackLayout>
<Label Text="Hello Content Popup Page"></Label>
</StackLayout>
</xct:Popup.Content>
</xct:Popup>


thank you for help :-)

kind regards

stefan


110201-xct-popup-bug.jpg


110156-xct-popup-bug-2.jpg


dotnet-xamarin
xct-popup-bug.jpg (99.0 KiB)
xct-popup-bug-2.jpg (93.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

StefanBauerfeindt-6476 avatar image
0 Votes"
StefanBauerfeindt-6476 answered

Dear Leon,

sorry for delaying, i was sick.

thanks for your answer, i found a pretty simple solution to solve my problem:

<?xml version="1.0" encoding="utf-8" ?>
<xct:Popup xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:xct="clr-namespace:Xamarin.CommunityToolkit.UI.Views;assembly=Xamarin.CommunityToolkit"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TestPage">
<xct:Popup.Content>
<StackLayout Padding="{OnPlatform iOS=-27, Android=0}">
<Label Text="Hello Content Popup Page"></Label>
</StackLayout>
</xct:Popup.Content>
</xct:Popup>

111383-xct-popup-solution.jpg



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LeonLu-MSFT avatar image
0 Votes"
LeonLu-MSFT answered

Hello,​

Welcome to our Microsoft Q&A platform!

I find a similar issue in Xamarin.CommunityToolkit GitHub. It set trans parent backgrounds to achieve it, but for iOS, it do not achieve it like following screenshot.

https://github.com/xamarin/XamarinCommunityToolkit/issues/1097#issuecomment-803399516

110511-image.png


Here is another ways to achieve it, you can use Rg.Plugins.Popup

Here is my test running screenshot with Rg.Plugins.Popup.

110410-image.png

About how to use it, you can refer to this wiki

https://github.com/rotorgames/Rg.Plugins.Popup/wiki

Best Regards,

Leon Lu



If the response is helpful, please click "Accept Answer" and upvote it.

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.



image.png (63.0 KiB)
image.png (364.9 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AlexChuchko-7920 avatar image
0 Votes"
AlexChuchko-7920 answered

220000-image.png



Hello! Fulfilled your recommendations, but now the CollectionView at a height of 27 does not work. Please tell me how to fix this problem!


image.png (125.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.