Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使 ListBoxItem 的内容可复制?不可编辑。
您可以使用上下文菜单、按钮或键绑定 (Ctrl+C) 来实现此目的
如果您在视图模型中准备好 ListBoxItem 内容,那么在上述其中一项启动的命令中说
Clipboard.SetData(DataFormats.Text, (Object)contentOfListBoxItem);
这会将 contentOfListBoxItem 复制到剪贴板