radmaskedtextbox

Getting Literal Value from a Masked Text Box Input

荒凉一梦 提交于 2019-12-13 17:42:59
问题 I've set up a Telerik RadMaskedTextBox with a Mask of "####-####". The problem is, when I later grab the value from this box it returns as "########". I'm unfamiliar with MaskedTextBoxes but I'm guessing that this is the default way it's supposed to return my value. How can I set the "-" as a literal character in the RadMaskedTextBox so it returns the whole value? ex. "1234-5678" instead of "12345678" 回答1: Use TextWithLiterals instead of Text property. 回答2: I'm unfamiliar with the Telerik

With the Telerik Silverlight controls, how can I cast a RadMaskedTextBox as a TextBox

冷暖自知 提交于 2019-12-12 06:58:17
问题 I am trying to determine if a Telerik RadMaskedTextBox allows multiline input. I the debugger, I was able to find and check the .AcceptsReturn property of the underlying textbox, using: ((System.Windows.Controls.TextBox)(((Telerik.Windows.Controls.RadMaskedTextBox)(this)).textBox)).AcceptsReturn; However, when I paste that into my C# code, the compiler complains that RadMaskedTextBox cannot be cast as a TextBox A little weird, since the Debugger allows it. The debugger also allows: ((System

Rad Mask TextBox: Change Text to upper and position cursor at end of the text.

荒凉一梦 提交于 2019-12-11 15:06:52
问题 I have Rad Mask TextBox and a button. So user can enter any case into the text box. when button is clicked, I am fetching some record based on text and event I have to change the text to upper, trim and position the caret to end. I noticed, if upper case is entered, I get all the scenario's but when lower case is entered the postion of cursor is pointed to beginning. this is what I tried. txtSearch.MaskedText = txtSearch.MaskedText.ToUpperInvariant().Trim(); txtSearch.SelectionOnFocus =