Answers for "wpf c# copy to clipboard"

C#
0

c# paste from clipboard

// Paste text from the clipboard.
private void btnPaste_Click(object sender, EventArgs e)
{
    txtPaste.Text = Clipboard.GetText();
}

// Copy text to the clipboard.
private void btnCopy_Click(object sender, EventArgs e)
{
    Clipboard.SetText(txtCopy.Text);
}
Posted by: Guest on September-03-2021
0

c# wpf get clipboard text

//for wpf
using System.Windows;

Clipboard.GetText() //gets Text as string
Clipboard.SetText("hello"); //sets Clipboard to "hello"
Posted by: Guest on January-10-2022

C# Answers by Framework

Browse Popular Code Answers by Language