When a file is created, you can write content into it. In this recipe, you will learn how to use plain text as the content of an existing file.
As an example, you will create a simple application for saving notes. The page will contain a text block as the header, a textbox for entering content, and the Save button. A design of the page is presented in the following image:
To prepare an example that saves notes in a textual file, perform the following steps:
Prepare the design of the page by modifying the content of the
MainPage.xaml
file, as shown in the following code snippet:<Page (...)> <Grid Padding="20"> (...) <TextBlock Grid.Row="0" Text="Note" FontSize="24" /> <TextBox Grid.Row="2" ...