开发者

With the Telerik Silverlight controls, how can I determine if RadMaskedTextBox allows multiline input

开发者 https://www.devze.com 2023-03-07 18:36 出处:网络
Using the Telerik RadMaskedTextBox control in C#, how can I tell if the underlying textbox allows multiline input

Using the Telerik RadMaskedTextBox control in C#, how can I tell if the underlying textbox allows multiline input

Edit: The Silverlight version does not appear to contain the .Textmode property and returns

'Telerik.Windows.Controls.RadMaskedTextBox' does not contain a definition for 'TextMod开发者_Go百科e' ...


You could always try reading the documentation.

To allow the RadMaskedTextBox to display its content in multiple lines you have to set the TextMode property to MultiLine

Work backwards to get whether the textbox is single- or multi-line.

See here for the documentation on the TextMode property.


From the Telerik Support Forum:

The underlying TextBox is of type ExtendedTextBox. You can access it like so:

var innerBox = this.masktextBox.ChildrenOfType<Telerik.Windows.Controls.MaskedTextBox.ExtendedTextBox>().FirstOrDefault();
0

精彩评论

暂无评论...
验证码 换一张
取 消