我有一個WPF,MVVM應用程序。在WPF中,如何實現文件上傳控件(文本框和一個按鈕來瀏覽文件)?
我需要與asp.net中的「文件上傳」控件相同的功能。
有人可以告訴我如何實現?
<StackPanel Orientation="Horizontal">
<TextBox Width="150"></TextBox>
<Button Width="50" Content="Browse"></Button>
</StackPanel>
我有這個xaml ...但是如何在點擊按鈕時顯示「瀏覽窗口」?
`DialogResult.OK`不存在,但我使用`bool? res = fileDialog.ShowDialog();如果(res.HasValue && res.Value){...}` – wormsparty 2011-08-31 14:26:36