Skip to content

Latest commit

 

History

History
23 lines (21 loc) · 703 Bytes

README.md

File metadata and controls

23 lines (21 loc) · 703 Bytes

MauiPopupExample

A trivial app trying to get a simple popup working

Steps taken to produce this example:

  1. Clean app from the Maui template in VS 17.2.0 Preview 5.0
  2. Add NuGets:
  • CommunityToolkit.Maui
  1. Add the necessary lines to the app builder
  • .UseMauiCommunityToolkit()
  1. Add a Popup page (see PopupPage)
  • consider setting CanBeDismissedByTappingOutsideOfPopup="False"
  • consider adding a "Close" button
  1. Add a button to MainPage:
  • <Button Text="Popup" Clicked="Popup_Clicked" />
  1. Add the event handler:
    private async void Popup_Clicked(object sender, EventArgs e)
    {
        var popup = new PopupPage();
        await this.ShowPopupAsync(popup);
    }