This is a migrated thread and some comments may be shown as answers.

multiline radtextbox

1 Answer 57 Views
InputPrompt
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Laurensius
Top achievements
Rank 1
Laurensius asked on 03 Feb 2014, 11:18 AM
Hi, is it possible to using mutliline radtextbox in inputprompt?
because i want to using this inputprompt for insertting comment / review  and it will be so ugly if i using radtextbox

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 05 Feb 2014, 05:41 PM
Hello Laurensius,

Thank you for your question.

Yes, you can by using style for the text box that is part of RadInputPrompt. Here's an example:
private async void ShowPrompt()
{
    Style textBoxStyle = new System.Windows.Style(typeof(RadTextBox));
    textBoxStyle.Setters.Add(new Setter(RadTextBox.AcceptsReturnProperty, true));
    textBoxStyle.Setters.Add(new Setter(RadTextBox.MinHeightProperty, 200));
 
    InputPromptClosedEventArgs args = await RadInputPrompt.ShowAsync("Enter your name", inputStyle: textBoxStyle);
    MessageBox.Show("Hello, " + args.Text);
}

The AcceptsReturn property will ensure that you can use Enter to go to next line and MinHeight will ensure that initially the text box will be high enough to hint for its multiline capabilities.

I hope this information helps.

Regards,
Todor
Telerik
If you want to get updates on new releases, tips and tricks and sneak peek previews directly from the developers working on the UI for Windows Phone, subscribe to the blog feed now.
Tags
InputPrompt
Asked by
Laurensius
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or