Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > MaskedTextBox > How to add multiline on MaskedTextbox?

Not answered How to add multiline on MaskedTextbox?

Feed from this thread
  • Richa avatar

    Posted on Oct 19, 2010 (permalink)

    Hi,


    Please help me out , for how to add multilines on RadMaskTextBox.Check the code below:

     

     

     

    <telerikInput:RadMaskedTextBox x:Name="Membervalueoutcome" MaskType="None" Height="50" VerticalContentAlignment="Top" />

     





    Thanks,
    Richa

    Reply

  • Alex Fidanov Alex Fidanov admin's avatar

    Posted on Oct 19, 2010 (permalink)

    Hello Richa,

    You can enable multiline on the RadMaskedTextBox, however you would have to enable this from the ControlTemplate itself. The control internally uses an extended TextBox, which supports the multiline feature. You would have to modify the default template of the RadMaskedTextBox and set the AcceptsReturn property of the ExtendedTextBox in its template to true.

    <telerikMaskedTextBox:ExtendedTextBox x:Name="PART_ExtendedTextBox"

    TabIndex="{TemplateBinding TabIndex}" IsTabStop="True" AcceptsReturn="True"

    ... />

    Greetings,
    Alex Fidanov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Kiran avatar

    Posted on Nov 14, 2010 (permalink)

    Hi

    Can you add complete code the code does not work when I add it to generic.xaml. Where do I refer telerikMaskedTextBox refered in the sample code.

    Regards
    Kiran

    Reply

  • Alex Fidanov Alex Fidanov admin's avatar

    Posted on Nov 15, 2010 (permalink)

    Hi Kiran,

    This is part of the ControlTemplate of the RadMaskedTextBox. Please note that you have to modify and apply the style with the changes to the RadMaskedTextBox in order for this to take effect ( <telerik:RadMaskedTextBox Style="{StaticResource ...}" />). You can use Blend to easily get the default style and modify it.

    Greetings,
    Alex Fidanov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Mike avatar

    Posted on Jan 4, 2012 (permalink)

    Hi Alex,

    i added the AcceptReturn Property and set it to true - but i can't do returns.
    are there any other needs to get the approach?

    thanks and with regards

    Mike

    Reply

  • Tina Stancheva Tina Stancheva admin's avatar

    Posted on Jan 6, 2012 (permalink)

    Hello Mike,

    The AcceptReturn property works only on RadMaskedTextBox control with MaskType set to None. So if you have defined a Mask on the control, the AcceptReturn property won't work.

    However you can take advantage of the MaskedTextInput control to create a multiline mask as demonstrated in this demo solution.

    Kind regards,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Mike avatar

    Posted on Jan 9, 2012 (permalink)

    Hi Tina,

    thanks for your reply.
    I get it to work - with MaskType set to none.
    But now i cant get the validation - when i set the Property MaxLength to f.e. 100 characters.
    So its just a simple textbox and i dont get any feature of the maskedtextinput control. right?
    Is there any approach to constraint the input of the user in a customed multiline box of a MaskedTextBox?

    Thanks for your advice

    Mike

    Reply

  • Tina Stancheva Tina Stancheva admin's avatar

    Posted on Jan 12, 2012 (permalink)

    Hello Mike,

    You can implement a validation scenario in the RadMaskedTextBox with a Mask set to None following the approach described in this tutorial. Give it a try and let me know if it helps.

    Kind regards,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > MaskedTextBox > How to add multiline on MaskedTextbox?
Related resources for "How to add multiline on MaskedTextbox?"

Silverlight MaskedTextBox Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]