|
[XAML] <StackLayout>
<sfPopup:SfPopupLayout x:Name="popup">
<sfPopup:SfPopupLayout.PopupView>
<sfPopup:PopupView HeaderTitle="Add Public Location" AutoSizeMode="Height" ShowCloseButton="False">
<sfPopup:PopupView.ContentTemplate>
<DataTemplate>
<StackLayout>
<Button Text="click to show another popup" Clicked="Button_Clicked"></Button>
</StackLayout>
</DataTemplate>
</sfPopup:PopupView.ContentTemplate>
</sfPopup:PopupView>
</sfPopup:SfPopupLayout.PopupView>
</sfPopup:SfPopupLayout>
<Button Clicked="Button_Clicked1"></Button>
</StackLayout> [C#] SfPopupLayout popupLayout;
public MainPage()
{
InitializeComponent();
popupLayout = new SfPopupLayout();
}
private void Button_Clicked(object sender, EventArgs e)
{
popupLayout.HeightRequest = 200;
popupLayout.WidthRequest = 100;
popupLayout.PopupView.ContentTemplate = new DataTemplate(() => { Label label = new Label(); label.Text = "Second Popup"; return label; });
popupLayout.Show();
} |