public void Copy() { try { if (_share.Data.Properties.ApplicationName != Constants.ApplicationName) { _share.ReportSubmittedBackgroundTask(); var content = new DataPackage(); _values.CopyTo(content); Windows.ApplicationModel.DataTransfer.Clipboard.SetContent(content); Windows.ApplicationModel.DataTransfer.Clipboard.Flush(); Windows.ApplicationModel.DataTransfer.Clipboard.ContentChanged += OnClipboardContentChanged; _share.DismissUI(); } else { _share.ReportCompleted(); } } catch (Exception ex) { _share.ReportError(ex.Message); } }
private void DismissUI_Click(object sender, RoutedEventArgs e) { m_shareOperation.DismissUI(); }