MobileForms Toolkit Documentation

AdvancedList.Templates Property

Gets or sets the current template set.

public TemplateSet Templates {get; set;}

Property Value

The TemplateSet containing currently used templates.

Remarks

TemplateSet is the collection of RowTemplates. The TemplateIndex and SelectedTemplateIndex are the indices to this template set, using the Default template, when incorrect index is used.

You can have prepared more template sets for different occassions, and change the look of the AdvancedList by simply swapping the template sets without changing the indices in each Row.

Example

[Visual Basic]

Private Sub SimpleCheck_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs)_
 Handles SimpleCheck.CheckedChanged
    ' we will switch the templates from simple to graphical
    If SimpleCheck.Checked Then
        AdvancedList1.Templates = SimpleTemplateSet
    Else
        AdvancedList1.Templates = GraphicalTemplateSet
    EndIf
End Sub
            
[C#]

private void SimpleCheck_CheckedChanged(object sender, EventArgs e)
{
    // we will switch the templates from simple to graphical
    if (SimpleCheck.Checked)
        advancedList1.Templates = simpleTemplateSet;
    else
        advancedList1.Templates = graphicalTemplateSet;
}
            

See Also

AdvancedList Class | Resco.Controls.AdvancedList Namespace