开发者

How can you make the content of a ListBoxItem copyable?

开发者 https://www.devze.com 2023-01-04 02:10 出处:网络
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)

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

精彩评论

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