Dear Syncfusion,
when my popup is opened the second time, it's position is not the same like opening the first time. Here's the code:
using Syncfusion.ListView.XForms;
using Syncfusion.XForms.PopupLayout;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xamarin.Forms;
namespace AppXamlTest
{
public class MainPage : ContentPage
{
SfPopupLayout menuPopup;
Button titleButton;
DataTemplate DataTemplate;
public MainPage()
{
titleButton = new Button();
titleButton.Text = "Arbeitsbereich 1";
titleButton.Clicked += Button_Clicked;
NavigationPage.SetTitleView(this, titleButton);
CreateMenuPopup();
StackLayout stackLayout = new StackLayout();
stackLayout.Children.Add(new Label { Text = "Welcome to Xamarin.Forms!" });
this.Content = stackLayout;
}
void Button_Clicked(object sender, EventArgs e)
{
try
{
menuPopup.Show(0D, 0D);
}
catch (Exception ex)
{
}
}
void CreateMenuPopup()
{
menuPopup = new SfPopupLayout();
menuPopup.Padding = 10;
menuPopup.PopupView.ShowFooter = false;
menuPopup.PopupView.ShowHeader = false;
DataTemplate = new DataTemplate(() =>
{
var menuItems = new List<string>() { "A", "B", "C" };
ListView listView = new ListView();
listView.ItemsSource = menuItems;
return listView;
});
menuPopup.PopupView.ContentTemplate = DataTemplate;
}
}
}