private void OnSettingData(object sender, DataObjectSettingDataEventArgs e) { // disable copying HTML if (e.Format == DataFormats.Html || e.Format == typeof(string).FullName) { e.CancelCommand(); } }
static public void onTextViewSettingDataHandler(object sender, DataObjectSettingDataEventArgs e) { // Disable HTML formatting for copied text. var textView = sender as TextEditor; if (textView != null && e.Format == DataFormats.Html) { e.CancelCommand(); } }