Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example how copy text to clipboard in Xamarin.Forms applications. - http://julianocustodio.com/clipboard
using Plugin.Clipboard;
using System;
using Xamarin.Forms;
namespace ClipboardDemo
{
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}
private async void Copy(object sender, EventArgs e)
{
CrossClipboard.Current.SetText(Mensagem.Text);
await DisplayAlert("Atenção", "O Texto \""
+ CrossClipboard.Current.GetText()
+ "\" foi copiado.", "OK");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment