A popup is a .NET MAUI Community Toolkit UI element for displaying transient content above the current page. Create one by installing CommunityToolkit.Maui, registering UseMauiCommunityToolkit(), and changing a ContentPage into a Popup. section 6.2.2
A practical popup implementation typically includes:
- Declare mct:Popup in XAML, remove the ContentPage Title, and set a size such as 600 by 600. section 6.2.2
- Pass data through the constructor, expose bindable properties or collections, and set BindingContext to the popup. section 6.2.2
- Handle selection changes and close with a result, including a result when the user taps outside. section 6.2.2
Genre selection and movie details
A movie application uses one popup for a multi-select genre list and another for movie details. The genre popup binds a CollectionView to an ObservableCollection<UserGenre>, tracks whether selection changed, and returns that state on confirmation or outside dismissal. The details popup binds title, description, poster, rating, and genre names from a MovieResult. section 6.2.2
builder.UseMauiApp<App>().ConfigureFonts().UseMauiCommunityToolkit();
Use the toolkit registration line as the first configuration step before creating popup pages. section 6.2.2
