Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
145579 | Jun 28,2019 01:34 PM UTC | Jul 24,2019 09:38 AM UTC | Xamarin.Forms | 4 |
![]() |
Tags: SfPopup |
[C#]
public partial class MainPage : ContentPage
{
private Command<SfPopupLayout> _openDialog;
public Command<SfPopupLayout> OpenDialog
{
get { return this._openDialog; }
set { this._openDialog = value; }
}
public MainPage()
{
InitializeComponent();
this.OpenDialog = new Command<SfPopupLayout>(this.DisplayDialog);
this.BindingContext = this;
}
private void DisplayDialog(SfPopupLayout popupLayout)
{
popupLayout.Show();
}
} |
OK. I have pretty much given up on this. I cannot get it to work in my project. I copy your code snippets exactly and I get an error. I am getting a timeout error in the DisplaySaveDBDialog when the popupLayout.Show(); is called.
I copied your code exactly into my project including all of the ContentPage.Resources .... /ContentPage.Resources section.
I have attached a screen shot of the call to DisplaySaveDBDialog and showing the popupLayout object does exist though it is hard to make out because of PrtSc capability.
Unless you know what might cause this error I guess I am stuck with defining the whole popup UI in code behind.
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle bundle)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(bundle);
global::Xamarin.Forms.Forms.Init(this, bundle);
Syncfusion.XForms.Android.PopupLayout.SfPopupLayoutRenderer.Init();
LoadApplication(new App());
}
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.