Version

Paste Method

Performs a Paste edit operation.
Syntax
'Declaration
 
Public Sub Paste() 
public void Paste()
Example
Following code illustrates how one can use Paste method to paste the contents of the clipboard in the maske edit.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinMaskedEdit

  Private Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button4.Click
      ' Following code selects some text into the clipboard and then pastes
      ' it onto the masked edit control. Paste method pastes what's in the 
      ' clipboard at the SelectionStart which is where the caret is flashing
      ' if there is no selected text.

      ' For the demonstration purpose, we are going to set InputMask and put some
      ' text in the clipboard.
      Me.ultraMaskedEdit1.InputMask = "###-###-####"
      Clipboard.SetDataObject("123-456-7890")

      ' Set the caret's position at the first character in the masked edit.
      Me.ultraMaskedEdit1.Text = ""
      Me.UltraMaskedEdit1.SelectionStart = 0
      Me.UltraMaskedEdit1.SelectionLength = 0

      ' Now paste.
      Me.UltraMaskedEdit1.Paste()
  End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinMaskedEdit;
using System.Diagnostics;

private void button4_Click(object sender, System.EventArgs e)
{
	// Following code selects some text into the clipboard and then pastes
	// it onto the masked edit control. Paste method pastes what's in the 
	// clipboard at the SelectionStart which is where the caret is flashing
	// if there is no selected text.

	// For the demonstration purpose, we are going to set InputMask and put some
	// text in the clipboard.
	this.ultraMaskedEdit1.InputMask = "###-###-####";
	Clipboard.SetDataObject( "123-456-7890" );

	// Set the caret's position at the first character in the masked edit.
	this.ultraMaskedEdit1.Text = "";
	this.ultraMaskedEdit1.SelectionStart = 0;
	this.ultraMaskedEdit1.SelectionLength = 0;

	// Now paste.
	this.ultraMaskedEdit1.Paste( );
}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, 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

See Also