Using the Declarative UI for our settings page
Since we have now learned how the Declarative UI works, it should be a simple task to convert our JavaScript version, which we created in Chapter 2, The Project Structure, into a Declarative UI version. Let's see if you can accomplish this on your own. If you get stuck or just want to verify, please feel free to see how I did it. Let us start by creating a new settings.xml
file.
Our settings.xml file
Let us see how much we have learned. I will ask a question, and you determine if you can answer it.
- The first thing we need to do is create the _____ component. Yes, you are totally correct; the Page component is always first. Now, this next one is going to be tricky.
- The next component you need is ____. If, you said StackLayout, you are close—the StackLayout will be needed, but we have one other component property that should actually come before it. You might want to read the source code to the
settings.js
file again to see if you can...