How do I create a folder in the application package to the user folder name as you wish? After clicking createBtn, it will display a pop up for the user to type the folder name in accordance with the wishes of the user. After clicking OKBtn will create a folder on the local package matches the name typed earlier.
XAML:
<AppBarButton x:Name="createBtn" Icon="Folder" Label="Tambah Folder" Foreground="White" Click="createBtn_Click"/>
You can't create a folder in the application package. The app package is read only and shared amongst users.
If you want to have the user choose a folder then use a FolderPicker and let the user choose a folder anywhere she has access. Save the returned StorageFolder in a FutureAccessList so that the app can access it later without the user having to pick it again.
See Quickstart: Accessing files with file pickers for examples.
We'll need a StorageFolder to track the folder the user picked, and a token to identify the item in the FutureAccessList so it can be retrieved later.
And a quick code snippet to pick and remember the folder: