Hello, Welcome to Microsoft Q&A!
There is no built-in control like that. You might need to create a "string picker" using ContentDialog by yourself. What you just need to put a TextBox inside the ContentDialog to get user input. I've made a simple one and you could refer to it: Xaml:
<ContentDialog x:Name="termsOfUseContentDialog"
Title="Title"
PrimaryButtonText="OK"
PrimaryButtonClick="termsOfUseContentDialog_PrimaryButtonClick"
CloseButtonText="Cancel">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Text="This is meesage" Grid.Row="0" Margin="5"/>
<TextBox x:Name="InputBox" Width="350" Height="32" Grid.Row="1" Margin="5" PlaceholderText="URL"/>
</Grid>
</ContentDialog>
Code-behind:
public MainPage()
{
this.InitializeComponent();
this.Loaded += MainPage_Loaded;
}
private async void MainPage_Loaded(object sender, RoutedEventArgs e)
{
await termsOfUseContentDialog.ShowAsync();
}
private void termsOfUseContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
{
var inputstring = InputBox.Text;
}
How it looks like:
Thank you.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.