multiline radtextbox

Thread is closed for posting
2 posts, 0 answers
  1. Laurensius
    Laurensius avatar
    17 posts
    Member since:
    Jan 2014

    Posted 03 Feb 2014 Link to this post

    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
  2. Todor
    Todor avatar
    798 posts

    Posted 05 Feb 2014 Link to this post

    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.

    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.
Back to Top