开发者

How can you make the content of a ListBoxItem copyable?

How can you make the content of a List开发者_开发问答BoxItem copyable? not editable.


You can achieve this using a contextmenu, a button or keybinding(Ctrl+C)

If you've your ListBoxItem content ready in your viewmodel then in the command initiated by one of the above say

Clipboard.SetData(DataFormats.Text, (Object)contentOfListBoxItem);

This would copy the contentOfListBoxItem to clipboard

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜