111,095
社区成员




var lstb = new ListBox();
lstb.Items.Add(new Label { Text = "1" });
var lbl = lstb.Items[0] as Label;
至于copy可以写成
var copyString = "";
foreach(var item in lstb.SelectedItems)
{
if(item is Label lbl)
{
copyString += $"{lbl.Text}\r\n";
}
}
Clipboard.SetText(copyString);