How to allow copying message on MessageBox

后端 未结 5 1796
無奈伤痛
無奈伤痛 2021-02-06 20:52

How can I allow selecting and copying of text from MessageBox in WPF?

5条回答
  •  失恋的感觉
    2021-02-06 21:04

    If you're displaying the messagebox...

    System.Windows.Forms.Clipboard.SetDataObject(messageToShowInMsgBoxString, true);
    

    will copy the item to the clipboard.

提交回复
热议问题