Specifies whether to select only the entered characters or all the characters (including prompt characters) when the editor performs the operation of select all text. The default value of the property is SelectAllCharacters.
The following code demonstrates how SelectAllBehavior property works. It prints out what gets selected when performing SelectAll operation with each SelectAllBehavior setting. Note that this also affects what gets selected when the user double clicks in the editor to select all the content. Note that the ClipMode is set to IncludeBoth so the SelectedText property (which we are using to find out what is selected) includes prompt and literal characters as well.
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 + "'" );
}
<igEditors:XamMaskedEditor x:Name="maskedEditor1" />
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