Similarly to choosing a file to open, it is also possible to show a file picker for selecting a target location where content should be saved. You will learn how to support such a feature in this recipe.
As an example, you will create a page with the Choose a file button. After clicking on it, a file picker will be presented. When a text file is chosen, the name of the current day will be saved within it.
To prepare an example that saves a textual content in the file specified by the user, perform the following steps:
Add the Choose a file button to the page by adjusting the content of the
MainPage.xaml
file, as follows:<Page (...)> <Grid Background="White"> <Button Content="Choose a file" (...) Click="BtnChoose_Click" /> </Grid> </Page...