'Declaration Public Property SelectAllBehavior As MaskSelectAllBehavior
public MaskSelectAllBehavior SelectAllBehavior {get; set;}
When this property is set to SelectEnteredCharacters, the select-all-text operation will select text starting from the first entered character to the last entered character, including adjacent literals.
Private Sub Button1_Click(ByVal sender As Object, ByVal e As RoutedEventArgs) Me.maskedEditor1.Mask = "###-##-####" Me.maskedEditor1.Value = "111-22-" Me.maskedEditor1.ClipMode = MaskMode.IncludeBoth Me.maskedEditor1.StartEditMode() Me.maskedEditor1.SelectAllBehavior = MaskSelectAllBehavior.SelectAllCharacters Me.maskedEditor1.SelectAll() Debug.WriteLine("SelectedText with SelectAllCharacters = '" & Me.maskedEditor1.SelectedText & "'") Me.maskedEditor1.SelectAllBehavior = MaskSelectAllBehavior.SelectEnteredCharacters Me.maskedEditor1.SelectAll() Debug.WriteLine("SelectedText with SelectEnteredCharacters = '" & Me.maskedEditor1.SelectedText & "'") End Sub
public void button1_Click( object sender, RoutedEventArgs e ) { this.maskedEditor1.Mask = "###-##-####"; this.maskedEditor1.Value = "111-22-"; this.maskedEditor1.ClipMode = MaskMode.IncludeBoth; this.maskedEditor1.StartEditMode( ); this.maskedEditor1.SelectAllBehavior = MaskSelectAllBehavior.SelectAllCharacters; this.maskedEditor1.SelectAll( ); Debug.WriteLine( "SelectedText with SelectAllCharacters = '" + this.maskedEditor1.SelectedText + "'" ); this.maskedEditor1.SelectAllBehavior = MaskSelectAllBehavior.SelectEnteredCharacters; this.maskedEditor1.SelectAll( ); Debug.WriteLine( "SelectedText with SelectEnteredCharacters = '" + this.maskedEditor1.SelectedText + "'" ); }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2