作者chris75123 (123)
看板C_Sharp
标题[问题] SurfaceListBox提取选取的档案路径
时间Tue Mar 15 17:37:52 2011
请问该怎麽取呢
photo是SurfaceListBox的name
将档案放入SurfaceListBox
foreach (string file in Directory.GetFiles(photoPuzzlesPath, "*.jpg"))
{
Image img = new Image();
img.Source = new BitmapImage(new Uri(file));
photo.Items.Insert(photo.Items.Count,img);
}
接下来就不知道怎麽取得选取的档案的路径了...
MessageBox.Show(photo.SelectedItem.ToString());
show出来的都是"System.Windows.Controls.ViewBox"
从photo. 找也找不到能取得路径的方法@@
C#新手...麻烦各位了...谢谢!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.123.105.52