private async void ImportDictionaryButtonClick(object sender, RoutedEventArgs e) { var filePicker = new FileOpenPicker(); filePicker.FileTypeFilter.Add(".txt"); filePicker.ViewMode = PickerViewMode.Thumbnail; filePicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary; filePicker.SettingsIdentifier = "picker1"; filePicker.CommitButtonText = "Import user dictionary"; var files = await filePicker.PickSingleFileAsync(); if (files == null) { return; } WritePadAPI.importUserDictionary(files.Path); }