MobileForms Toolkit Documentation

AdvancedTree.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 NodeTemplates. 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 AdvancedTree by simply swapping the template sets without changing the indices in each Node.

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
        AdvancedTree1.Templates = SimpleTemplateSet
    Else
        AdvancedTree1.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)
        advancedTree1.Templates = simpleTemplateSet;
    else
        advancedTree1.Templates = graphicalTemplateSet;
}
            
    

See Also

AdvancedTree Class | Resco.Controls.AdvancedTree Namespace