You may add other properties, this is the bare minimum required.
Where |ClassName| is the template's class (Introduction) and |DirName| is name of the template directory.
You need xmlns, xmlns:x, x:Class properties as always, but additionally you need xmlns:template to import template's namespace.
Next, insert blocks inside of the root tag:
Blocks are inner tags of each template, that are defined in it. You can change contents of those blocks, therefore using template as you wish. You can modify none, one or more blocks in the same file.
|BlockName| is selected block's name.
Also main content block can be specified in template, then content, that you put directly into the root tag's content and it will be shown in main content block.
Example
The following code is equivalent to this, as it used main content block, that was mentioned before:
.xaml.cs file of your page
You just make regular class for .xaml but the only difference is that this class inherits from the template class.
After that you just add everything you need for that page as usual.
namespace <your_namespace>;
public partial class <your_class_name> : <template_class>
{
public <your_class_name>()
{
InitializeComponent();
}
}
using PlutoFramework.Components.CustomLayouts;
using PlutoFramework.Components.Kilt;
using PlutoFramework.Components.Credits;
using PlutoFramework.Model;
using PlutoFramework.Model.SQLite;
using PlutoFramework.View;
using PlutoFramework.Templates.PageTemplate;
namespace PlutoFramework.Components.Settings;
public partial class SettingsPage : PageTemplate
{
public SettingsPage()
{
InitializeComponent();
BindingContext = new SettingsViewModel();
}
// Other methods
}