PasswordBox.Paste 메서드

정의

PasswordBox에서 현재 선택한 내용을 클립보드의 내용으로 바꿉니다.

public:
 void Paste();
public void Paste ();
member this.Paste : unit -> unit
Public Sub Paste ()

예제

다음 예제에서는 메서드를 사용하여 콘텐츠를 붙여넣는 PasswordBox Paste 방법을 보여 있습니다.

  // A TextBox will serve as a contrived means of putting our test 
  // password on the Clipboard.
  TextBox txtBox = new TextBox();
  PasswordBox pwdBox = new PasswordBox();

  // Put some content in the TextBox, and copy it to the Clipboard.
  txtBox.Text = "Open Sesame!";
  txtBox.SelectAll();
  txtBox.Copy();

  // Paste the contents of the Clipboard into the PasswordBox.  After this
  // call, the value of pwdBox.Password == "Open Sesame!".
  pwdBox.Paste();
' A TextBox will serve as a contrived means of putting our test 
' password on the Clipboard.
Dim txtBox As New TextBox()
Dim pwdBox As New PasswordBox()

' Put some content in the TextBox, and copy it to the Clipboard.
txtBox.Text = "Open Sesame!"
txtBox.SelectAll()
txtBox.Copy()

' Paste the contents of the Clipboard into the PasswordBox.  After this
' call, the value of pwdBox.Password == "Open Sesame!".
pwdBox.Paste()

설명

이 메서드는 붙여넣기 이전의 PasswordBox 내용을 지우지 않습니다. 현재 선택 영역을 붙여넣은 콘텐츠로 바꾸거나 붙여넣은 내용을 현재 커서 위치에 삽입합니다.

적용 대상