Reputation: 693
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
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
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()
Upvotes: 9
Reputation: 3077
You should try Acr.UserDialogs
NuGet: https://www.nuget.org/packages/Acr.UserDialogs/
GitHub Repo: https://github.com/aritchie/userdialogs
Upvotes: 10