# Getting Started with the .NET MAUI Popup

This guide provides the information you need to start using the [Telerik UI for .NET MAUI Popup](https://www.telerik.com/maui-ui/documentation/controls/popup/overview) by adding the control to your project.

At the end, you will achieve the following result.

![.NET MAUI Popup Getting Started](https://www.telerik.com/maui-ui/documentation/assets/8604dc29e2e5410c652a0a8b9596cf49/popup-getting-started.png)

## Prerequisites

Before adding the Popup, you need to:

1. [Set up your .NET MAUI application](https://www.telerik.com/maui-ui/documentation/get-started/quickstart#prerequisites).

2. [Set Up Telerik Development Environment](https://www.telerik.com/maui-ui/documentation/get-started/quickstart#set-up-telerik-development-environment)

## Define the Control

**1.** When your .NET MAUI application is set up, you are ready to add a Popup control to your page.

For demonstration purposes, the current scenario shows how to add a sample Popup attached to a Button control. The purpose of the Popup here is to receive user input—It contains the Entry control for allowing the user to enter a comment and a button for closing the popup.

```XAML
<telerik:RadTemplatedButton HorizontalOptions="{OnPlatform Default=Center, MacCatalyst=Start, WinUI=Start}"
                            VerticalOptions="{OnPlatform Default=Center, MacCatalyst=Start, WinUI=Start}"
                            Content="Show more info"
                            Clicked="ShowPopup">
    <telerik:RadPopup.Popup>
        <telerik:RadPopup x:Name="popup"
                          OutsideBackgroundColor="#66000000"
                          Placement="{OnPlatform Android=Center, iOS=Center}"
                          VerticalOffset="8">
            <telerik:RadBorder BackgroundColor="#F9F9F9"
                               CornerRadius="8"
                               WidthRequest="300">
                <VerticalStackLayout>
                    <Grid BackgroundColor="#E0E0E0"
                          Padding="12">
                        <Label Text="Info Popup"
                               TextColor="#666666"
                               HorizontalOptions="Center" />
                        <Label FontFamily="TelerikFontExamples"
                               FontSize="16"
                               Text="&#xe877;"
                               TextColor="#666666"
                               HorizontalOptions="End"
                               x:Name="closeButton">
                            <Label.GestureRecognizers>
                                <TapGestureRecognizer Tapped="ClosePopup" />
                            </Label.GestureRecognizers>
                        </Label>
                    </Grid>
                    <Label Padding="12"
                           TextColor="Black"
                           Text="Telerik offers a wide range of .NET MAUI controls to enable your cross-platform development of native Windows, macOS, Android and iOS applications."
                           LineBreakMode="WordWrap" />
                </VerticalStackLayout>
            </telerik:RadBorder>
        </telerik:RadPopup>
    </telerik:RadPopup.Popup>
</telerik:RadTemplatedButton>
```

**2.** Reference the event handlers for showing/hiding the Popup.

```C#
private void ShowPopup(object sender, EventArgs e) => popup.IsOpen = true;

private void ClosePopup(object sender, TappedEventArgs e) => popup.IsOpen = false;
```

**3.** Add the namespace.

```XAML
xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
```

**4.** Register the Telerik controls through the `Telerik.Maui.Controls.Compatibility.UseTelerik` extension method called inside the `CreateMauiApp` method of the `MauiProgram.cs` file of your project:

```C#
using Telerik.Maui.Controls.Compatibility;

public static class MauiProgram
{
	public static MauiApp CreateMauiApp()
	{
		var builder = MauiApp.CreateBuilder();
		builder
			.UseTelerik()
			.UseMauiApp<App>()
			.ConfigureFonts(fonts =>
			{
				fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
			});

		return builder.Build();
	}
}           
```

## Additional Resources

* [.NET MAUI Popup Product Page](https://www.telerik.com/maui-ui/popup)
* [.NET MAUI Popup Forum Page](https://www.telerik.com/forums/maui?tagId=1782)
* [Telerik .NET MAUI Blogs](https://www.telerik.com/blogs/mobile-net-maui)
* [Telerik .NET MAUI Roadmap](https://www.telerik.com/support/whats-new/maui-ui/roadmap)

## See Also

* [Modal Popup Support](https://www.telerik.com/maui-ui/documentation/controls/popup/modal-popup)
* [Placement Configuration](https://www.telerik.com/maui-ui/documentation/controls/popup/placement)
* [Animations](https://www.telerik.com/maui-ui/documentation/controls/popup/animations)
