【发布时间】:2010-07-28 07:13:11
【问题描述】:
我有一个组合框 (ItemsSource="{Binding Path=AvailableDrives}")。
AvailableDrives 属性定义如下:
public List<DriveInfo> AvailableDrives
{
get
{
return DriveInfo.GetDrives().Where(x => x.DriveType == DriveType.Removable).ToList();
}
}
它工作正常,但我希望如果我插入/拔出 USB 设备,组合框会重新填充而无需关闭并重新打开窗口。
我怎样才能做到这一点?
谢谢#
【问题讨论】:
标签: c# wpf binding combobox usb