prinsJoe
prinsJoe

Reputation: 693

Popup Dialog with Text Input in Xamarin Forms

So, I'm kind of new to Xamarin, and I'm trying to figure out how to display a pop-up that has a user-text-input field in it. DisplayAlert doesn't do it because it doesn't have a text-input field. What should I use?

Upvotes: 20

Views: 30728

Answers (3)

FetFrumos
FetFrumos

Reputation: 5944

You can using DisplayPromptAsync. It is from Xamarin Forms, without other plugins.

string result = await DisplayPromptAsync("Question 1", "What's your name?");

Upvotes: 22

Korayem
Korayem

Reputation: 12497

I personally love this nuget (source on github) which allows you to use PopupPage xaml view inside a popup and elegantly as it adds the following methods that look very familiar with what we're all used to:

Navigation.PushPopupAsync()
Navigation.PopPopupAsync()
Navigation.PopAllPopupAsync()
Navigation.RemovePopupPageAsync()

enter image description here

Upvotes: 9

Peyman
Peyman

Reputation: 3077

You should try Acr.UserDialogs

NuGet: https://www.nuget.org/packages/Acr.UserDialogs/

GitHub Repo: https://github.com/aritchie/userdialogs

Upvotes: 10

Related Questions