Я разрабатываю приложение IOS
с использованием Xamarin.Forms
, в этом приложении я показываю всплывающее окно, используя Rg.Plugins.Popup. Я попытался изменить border radius(Increase)
popup window
, но я не смог его достичь. Кто-нибудь, пожалуйста, помогите мне выполнить эти изменения в моем приложении.Xamarin forms set popup border radius using Rg.Plugins.Popup
Ожидаемый экран
Фактический экран
Popup.xaml
<?xml version="1.0" encoding="utf-8" ?>
<pages:PopupPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:pages="clr-namespace:Rg.Plugins.Popup.Pages;assembly=Rg.Plugins.Popup"
x:Class="TestApp.Popup"
xmlns:i18n="clr-namespace:TestApp;assembly=TestApp"
xmlns:local="clr-namespace:TestApp">
<StackLayout VerticalOptions="Center"
HorizontalOptions="FillAndExpand"
Padding="20, 10, 20, 20"
Opacity="0.9">
<Frame BackgroundColor="White"
>
<StackLayout Padding="0, 10, 0, 40" >
<RelativeLayout>
<Label x:Name="congratsText"
Text=""
TextColor="#396BA2"
FontAttributes="Bold"
FontSize="20"
FontFamily="MYRIADPRO-BOLD"
HorizontalTextAlignment="Center"
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent,Property=Width, Factor=1}"
RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Y, Factor=1,Constant=0}"
local:CustomFontEffect.FontFileName="MYRIADPRO-BOLD"/>
<Label x:Name="callText"
TextColor="#396BA2"
FontFamily="MYRIADPRO-REGULAR"
FontSize="18"
Margin="10"
HorizontalTextAlignment="Center"
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent,Property=Width, Factor=1}"
RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=foundText, Property=Y, Factor=1,Constant=60}"
local:CustomFontEffect.FontFileName="MYRIADPRO-REGULAR" >
<Label.FormattedText>
<FormattedString>
<FormattedString.Spans>
<Span Text="Please call " />
<Span Text="0987654321" FontAttributes="Bold" />
<Span Text="for any help." />
</FormattedString.Spans>
</FormattedString>
</Label.FormattedText>
</Label>
<Button x:Name="OkButton"
BackgroundColor="#9DC96F"
FontFamily="MYRIADPRO-BOLD"
FontAttributes="Bold"
FontSize="20"
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
RelativeLayout.HeightConstraint="40"
Text="Ok"
TextColor="White"
Clicked="ok"
RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ResendButton, Property=Y, Factor=1,Constant=75}"
local:CustomFontEffect.FontFileName="MYRIADPRO-BOLD"/>
<Button x:Name="LoginButton"
BorderColor="#9DC96F"
BackgroundColor="White"
BorderWidth="2"
FontFamily="MYRIADPRO-BOLD"
FontAttributes="Bold"
FontSize="20"
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
RelativeLayout.HeightConstraint="40"
Text="Cancel"
TextColor="#9DC96F"
Clicked="Cancel"
RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToView, ElementName=OkButton, Property=Y, Factor=1,Constant=55}"
local:CustomFontEffect.FontFileName="MYRIADPRO-BOLD"/>
</RelativeLayout>
</StackLayout>
</Frame>
</StackLayout>
</pages:PopupPage>
В соответствии с README для https://github.com/rotorgames/Rg.Plugins.Popup не существует свойства радиуса границы, которое можно настроить для всплывающей страницы. Либо свяжитесь с автором библиотеки, либо предложите добавить или загрузить исходный код и изменить его самостоятельно, чтобы добавить настройку радиуса границы. – jgoldberger
Спасибо @jgoldberger за ваше предложение. есть ли какой-либо другой «плагин» для отображения всплывающего окна с настройкой «border radius»? – Jamal
Вы можете скачать код sourse от github и добавить это самостоятельно. –