コード例 #1
0
 private void OnSettingData(object sender, DataObjectSettingDataEventArgs e)
 {
     // disable copying HTML
     if (e.Format == DataFormats.Html || e.Format == typeof(string).FullName)
     {
         e.CancelCommand();
     }
 }
コード例 #2
0
        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();
            }
        }