-2

I am new to windows 10 application development. I want to show some details to user when only user launch the app for the first time. Please help me to solve this problem !!

iuhettiarachchi
  • 431
  • 1
  • 9
  • 24
  • 2
    What is your problem at the first place? – Hari Mar 19 '18 at 08:10
  • 1
    Registry, Application-Settings, after all you could even create a "marker" file and check existence (not recommended) ... did you do any research? – Fildor Mar 19 '18 at 08:14
  • I just want to create some pages which include information about the app. I tried with IsolatedStorageSettings . but it doesn't exist in windows 10. – iuhettiarachchi Mar 19 '18 at 08:17
  • So which part is the actual problem? Getting together the info, or only showing them at first start? – Fildor Mar 19 '18 at 08:18
  • I just want to only showing them at first start – iuhettiarachchi Mar 19 '18 at 08:20
  • You can simply store your texts in a file installed with your application. When you start the app, check if the file exists and show its content, then delete it – Steve Mar 19 '18 at 08:30

1 Answers1

1

Use ApplicationDataContainer and check for a boolean on startup.

var localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;
if (localSettings.Values["HasStartedOnce"] == null) { 
    // (...do first-time-only things)
    localSettings.Values["HasStartedOnce"] = true;
}
Tewr
  • 3,713
  • 1
  • 29
  • 43