I downloaded a project and I have a popup working. I was doing the same thing on my project and nothing. It does not make any mistake, only the popup does not rise as it should, it occupies the whole area of the mu App. I put a button in the popup and it appears. I put a Frame and within the Frame two buttons and painted the Background of the Frame in Blue and nothing appears. My popup xaml and cs
<?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="Autorizador.Aprovar">
<StackLayout VerticalOptions="Center" HorizontalOptions="Center" Padding="0" Margin="0">
<Frame Margin="30" Padding="10" BackgroundColor="AliceBlue">
<Label HorizontalTextAlignment="Center" FontSize="Large" Text="Hello stilized popup!"></Label>
<Button
HorizontalOptions="End"
BackgroundColor="Gold"
HeightRequest="30"
WidthRequest="80"
Text="Gravar"
FontSize="9"
TextColor="Green" />
<Button
HorizontalOptions="End"
BackgroundColor="Gold"
HeightRequest="30"
WidthRequest="80"
Text="Feliz"
FontSize="9"
TextColor="Green" />
</Frame>
</StackLayout>
<StackLayout VerticalOptions="End" HorizontalOptions="Fill">
<Button
HorizontalOptions="End"
BackgroundColor="Gold"
HeightRequest="30"
WidthRequest="80"
Text="Fechar"
Clicked="Fechar_OnClicked"
FontSize="9"
TextColor="Green" />
</StackLayout>
</pages:PopupPage>
and my .cs
using Rg.Plugins.Popup.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace Autorizador
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class Aprovar
{
public Aprovar()
{
InitializeComponent();
//this.BackgroundColor = Color.White;
}
private async void Fechar_OnClicked(object sender, EventArgs e)
{
await base.Navigation.PopPopupAsync(true);
}
}
Below is a screenshot of the popup screen. The close button is inside the popup, but the Frame is not shown, as seen in the image.