Adding Content
Last updated
Last updated
⚙️ Powered by Rock RMS
When saving a new app, or selecting an existing one from the list, you'll be taken to the Application page. The title bar will show the name of your app on the left and the Site/App Id on the right, as well as the deployment status. Underneath you'll find tabbed navigation for the different areas of your app and some of the configuration values you previously selected.
To begin adding content to our app we need to navigate to the Pages area. The homepage has already been created for you. Selecting this page will bring you to the page details area where you can change the configuration and add blocks, similar to the process on Rock web.
Let's add our first block by selecting the Content block and dragging it into the Main section.
Once added click the Gear icon to change the block properties. In this Content block we'll add our first lines of XAML. Let's add a label and card to our page with the XAML below:
First we started with a StackLayout, which can display any number of child elements in a vertical orientation. Next we added a Label control with some text and a style class. Finally we added a Contained Card with some various text properties.
Below the content input are some options for enabling Lava commands and selecting if block is Dynamic Content. If enabled, making changes to the XAML content will be shown upon refresh of the page instead of requiring a full redeploy.
Page contents should be wrapped inside a Xamarin Forms layout to allow for rendering of multiple child elements. It's generally recommended to use a <StackLayout>
.
Clicking Save will add our XAML to the block. Now let's deploy our application and view it on a device.