when placement target is a StackLayout/GridLayout the popup is not visualized correctly.
For example:
<ContentPage.Content>Workaround: set VerticalOptions="StartAndExpand" to the StackLayout
Hi,
I'm using a popup and If the device is rotated when the pop-up is open, the UI gets disorted and gets a white space on sides or becomes uneven.
Please see the attached screenshots and below code to replicate the issue. Not sure about this issue occurring on android tablets.
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:ListViewRefresh"
xmlns:telerikInput="clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input"
xmlns:telerikPrimitives="clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives"
x:Class="ListViewRefresh.MainPage">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Button HorizontalOptions="Center" Grid.Row="0"
VerticalOptions="Start"
Text="Click here to rate"
Clicked="BtnTest_Clicked">
<telerikPrimitives:RadPopup.Popup>
<telerikPrimitives:RadPopup x:Name="popup"
Placement="Bottom"
OutsideBackgroundColor="#6F000000">
<telerikPrimitives:RadBorder CornerRadius="8"
WidthRequest="800"
HeightRequest="1000"
Padding="10"
VerticalOptions="FillAndExpand"
BackgroundColor="Wheat">
<Grid Padding="20">
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="20" />
<RowDefinition Height="40" />
</Grid.RowDefinitions>
<Label Text="Please rate your experience" />
<telerikInput:RadShapeRating Grid.Row="1" />
<Button Grid.Row="2"
Padding="2"
HorizontalOptions="End"
Text="Send"
Clicked="Button_Clicked" />
</Grid>
</telerikPrimitives:RadBorder>
</telerikPrimitives:RadPopup>
</telerikPrimitives:RadPopup.Popup>
</Button>
</Grid>
</ContentPage>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace ListViewRefresh
{
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}
private void BtnTest_Clicked(object sender, EventArgs e)
{
popup.IsOpen = true;
}
private void Button_Clicked(object sender, EventArgs e)
{
popup.IsOpen = false;
}
}
}
Provide an easy way to position the popup in the center of the screen in a MVVM-friendly manner.
Consider the case when the target is a view that carries information about the popup and cannot be the page.