RadPopups are instantly closing when tapped inside. It happens for example when DataForm control is placed inside the popup. It seems content inside the popup doesn't layout as expected. The content is not centered.
Workaround:
Add width to the parent layout/ control which is inside the popup
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.
when placement target is a StackLayout/GridLayout the popup is not visualized correctly.
For example:
<ContentPage.Content>Workaround: set VerticalOptions="StartAndExpand" to the StackLayout
Please add an option to center the Xamarin Popup on the page, both horizontally and vertically. The popup should not move when pickers (and other similar controls) are opened/closed.
Thank you