I can’t resize Popup in my App

Asked

Viewed 28 times

1

I downloaded a project and I have a popup working. I went to do the same thing in my project and nothing. There is no error, only the popup does not go up as it should, it occupies the entire area of the mu App. I put a button in the popup and appears. I put a Frame and inside the Frame two buttons and painted the Frame Background in Blue and nothing appears. My popup shampoo 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);
        }
    }

See below a screenshot of the popup screen. The close button is inside the popup, but the Frame is not shown, as seen in the image. inserir a descrição da imagem aqui

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.