Table of Contents
  • Getting Started
  • EO.Pdf
  • EO.Web
  • EO.WebBrowser
  • EO.Wpf
  • Common Topics
  • Reference
    • .NET API Reference
      • EO.Base
      • EO.Base.UI
      • EO.Extensions
      • EO.Pdf
      • EO.Pdf.Acm
      • EO.Pdf.Contents
      • EO.Pdf.Drawing
      • EO.Pdf.Mvc
      • EO.Web
      • EO.WebBrowser
      • EO.WebBrowser.DOM
      • EO.WebEngine
      • EO.WinForm
      • EO.Wpf
        • EO.Wpf
        • Classes
          • BareButton Class
          • Bitmap Class
          • BitmapButton Class
          • BooleanDependencyPropertyRoutedEventArgs Class
          • Button Class
          • Calendar Class
          • CalendarDayButton Class
          • CalendarMonth Class
          • CancelEventArgs Class
          • CheckBox Class
          • ChoiceMaskedEditSegment Class
          • ComboBox Class
          • ComboBoxItem Class
          • DatePicker Class
          • DateRangeCollection Class
          • DateRangeCollectionConverter Class
          • DockContainer Class
          • DockItem Class
          • DockItemClosingEventArgs Class
          • DockItemCollection Class
          • DockItemEventArgs Class
          • DockItemNeededEventArgs Class
          • DockView Class
          • DockViewCollection Class
          • DockViewCommands Class
          • DockViewEventArgs Class
          • DockViewNeededEventArgs Class
          • DocumentItem Class
          • DropDown Class
          • DropDownButton Class
          • DropDownService Class
          • EditItemEventArgs Class
          • Effect Class
          • EffectManager Class
          • Expander Class
          • ItemDragEventArgs Class
          • ItemDragOverEventArgs Class
          • ItemDropEventArgs Class
          • ItemsControlHelper Class
          • LinkButton Class
          • ListBox Class
          • ListBoxItem Class
          • MaskedEdit Class
          • MaskedEditSegment Class
          • MaskMaskedEditSegment Class
          • Menu Class
          • MenuBase Class
          • MenuItem Class
          • MonthPicker Class
          • MultiplyConverter Class
          • NamedResourceKey Class
          • NegationConverter Class
          • NewItemRequestedEventArgs Class
          • NumericMaskedEditSegment Class
          • OpacityConverter Class
          • PatternMaskedEditSegment Class
          • PdfViewer Class
          • ProgressBar Class
          • RadialPanel Class
          • RadioButton Class
          • RangeSlider Class
          • RegexMaskedEditSegment Class
          • RingDefinition Class
          • RingDefinitionCollection Class
          • Runtime Class
          • SkinStyleInfo Class
          • Slider Class
          • SliderBase Class
          • SpinEdit Class
          • SplitButton Class
          • SplitLineHeightConverter Class
          • SplitView Class
          • StaticMaskedEditSegment Class
          • TabControl Class
          • TabItem Class
          • TabItemCloseEventArgs Class
          • TabItemEventArgs Class
          • TemplatePresenter Class
          • ThemeManager Class
          • ThemeNames Class
          • ThemeStyleInfo Class
          • TreeView Class
          • TreeViewItem Class
          • UIElementHelper Class
          • UnitConverter Class
          • WebControl Class
          • WebView Class
          • WebViewHost Class
          • WeekDaysCollection Class
          • WindowChrome Class
          • WindowCommands Class
          • YearPicker Class
        • Structures
        • Enumerations
        • Delegates
      • EO.Wpf.Gauge
      • EO.Wpf.Gauge.Shapes
      • EO.Wpf.Primitives
      • EO.Wpf.Themes.Aero
      • EO.Wpf.Themes.Classic
      • EO.Wpf.Themes.Luna
      • EO.Wpf.Themes.Metro
      • EO.Wpf.Themes.Royale
    • JavaScript API Reference
Text Property

Gets or sets the MaskedEdit text.

Syntax
 public String Text { get; set; }
Remarks

Use this property to gets or sets the current text for the MaskedEdit control. The text of the MaskedEdit control is the Text of all child MaskedEditSegment controls concatenated together, including those for StaticMaskedEditSegments. For example, a MaskedEdit control used to enter date value may define the following segments:

XAML
<eo:MaskedEdit PromptChar="_">
    <eo:NumericMaskedEditSegment Digits="2" TabPattern="/" MinValue="1" MaxValue="12" AutoPadZeros="True"></eo:NumericMaskedEditSegment>
    <eo:StaticMaskedEditSegment Value="/"></eo:StaticMaskedEditSegment>
    <eo:NumericMaskedEditSegment Digits="2" TabPattern="/" MinValue="1" MaxValue="31" AutoPadZeros="True"></eo:NumericMaskedEditSegment>
    <eo:StaticMaskedEditSegment Value="/"></eo:StaticMaskedEditSegment>
    <eo:NumericMaskedEditSegment Digits="4" MinValue="1900" MaxValue="2100" AutoPadZeros="True"></eo:NumericMaskedEditSegment>
</eo:MaskedEdit>

For the above MaskedEdit, its Text may return something like "01/12/2013". Note the value of StaticMaskedEditSegment (the two "/"s) are returned as well.

When setting this property, the MaskedEdit control use a number of methods try to determine the best way to split a single string into different segments, and assign each segment to the corresponding MaskedEditSegment's Text property. For the date MaskedEdit sample above, this can be successfully achieved by matching the text of the two StaticMaskedEditSegment first. However this may not be possible for some other cases. Consider the following MaskedEdit control which contains two NumericMaskedEditSegment:

XAML
<eo:MaskedEdit PromptChar="_">
    <eo:NumericMaskedEditSegment Digits="5"></eo:NumericMaskedEditSegment>
    <eo:NumericMaskedEditSegment Digits="5"></eo:NumericMaskedEditSegment>
</eo:MaskedEdit>

It is possible for user to enter "12" in the first segment and "345" in the second segment, thus Text property returns "12345". However if you set Text to "12345", all 5 digits will be filled into the first NumericMaskedEditSegment, with the second NumericMaskedEditSegment being set to empty. To avoid such problems, you can use GetTextWithSeparator to explicitly insert separators between the Text of each MaskedEditSegment.

See Also