windowsforms-devexpress-dot-aiintegration-dot-winforms-dot-smartpastebehavior.md
Assigns the right values (from the clipboard) to the appropriate items.
Namespace : DevExpress.AIIntegration.WinForms
Assembly : DevExpress.AIIntegration.WinForms.v25.2.dll
NuGet Package : DevExpress.AIIntegration.WinForms
public Task SmartPasteAsync()
Public Function SmartPasteAsync As Task
| Type | Description |
|---|---|
| Task |
The task.
|
The following code snippet handles the GridView’s KeyDown event to invoke SmartPaste when a user presses Alt+P:
async void GridView1_KeyDown(object sender, KeyEventArgs e) {
if (e.KeyCode == Keys.P && e.Modifiers == Keys.Alt)
await behaviorManager1.GetBehavior<SmartPasteBehavior>(gridView1).SmartPasteAsync();
}
Async Sub GridView1_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs)
If e.KeyCode = Keys.P AndAlso e.Modifiers = Keys.Alt Then
Await behaviorManager1.GetBehavior(Of SmartPasteBehavior)(gridView1).SmartPasteAsync()
End If
End Sub
Read the following help topic for additional information: Smart Paste AI-powered Extension.
See Also