I'm able to select files through through folder browser dialog but I need to show the selected file in treelist control (Note: I'm using WPF and devexpress controls).
How can I achieve this? Please check the image:
*******************Code**********************
private void loadFilePst ()
{
try
{
Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
dlg.DefaultExt = ".pst";
dlg.Filter = "PST Files(*.pst)|*.pst";
Nullable<bool> output = dlg.ShowDialog();
if (dlg.ShowDialog() != true)
return;
using (Stream stream = dlg.OpenFile())
{
}
//if(output == true)
//{
// stgPath = dlg.FileName;
// string fileName = dlg.FileName;
// treePstSelect.Visibility = Visibility.Visible;
//}
//System.Windows.MessageBox.Show("Hola");
}
catch(Exception ae)
{
System.Windows.MessageBox.Show(ae.Message);
}
}