TextBox.Paste event

Applies to Windows and Windows Phone

Occurs when text is pasted into the control.

Syntax


public event TextControlPasteEventHandler Paste


<TextBox Paste="eventhandler"/>

Event information

Delegate TextControlPasteEventHandler

Remarks

The Paste event occurs before any content is inserted into the control. You can handle this event to check the contents of the clipboard and perform any actions on the content before it's inserted. If you perform any action, set the handled property to true; otherwise, the default paste action is performed. If you set the handled property to true, then it's assumed the app has handled the insertion, and no default action is performed. You are responsible for determining the insertion point and clipboard content to insert, and inserting the content.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

TextBox

 

 

Show:
© 2014 Microsoft. All rights reserved.