private void OnAddDocument() { Telerik.Windows.Controls.RadOpenFileDialog fileDialog = new Telerik.Windows.Controls.RadOpenFileDialog(); fileDialog.Owner = Application.Current.MainWindow; fileDialog.InitialDirectory = lastDirectory; fileDialog.RestoreDirectory = true; fileDialog.DefaultExt = "pdf"; fileDialog.Filter = "pdf files (*.pdf)|*.pdf"; bool?result = fileDialog.ShowDialog(); if (result == null) { return; } if (result == false) { return; } // set the selected Directory as InitialDirectory for the next open FileInfo fileInfo = new FileInfo(fileDialog.FileName); lastDirectory = fileInfo.DirectoryName; // ReportFileName only contains filename relative to travelExpenseRoot directory SelectedFileName = fileDialog.FileName; employeeDocuments.Add(new EmployeeDocument { DateValidUntil = null, DocumentContentDescription = string.Empty, DocumentType = DocumentTypes.Contract, DocumentFileName = "", Employee = selectedEmployee, EmployeeId = selectedEmployee.Id }); // Activate added item ListOfDocuments.MoveCurrentToLast(); RaisePropertyChanged("ListOfDocuments"); RaisePropertyChanged("SelectedDocument"); }