Templates, propriété
Retourne une valeur indiquant si un élément <Choice> possède ou non des modèles définis.
public IDictionary Templates {
get
}
Exemple
L'exemple suivant montre comment utiliser la propriété Templates.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Panel1.DeviceSpecific.Choices(0).HasTemplates Then
lblStatus.Text = "Loaded panel has " + Panel1.DeviceSpecific.Choices(0).Templates.Count.ToString() + " Templates. For Filter named " + Panel1.DeviceSpecific.Choices(0).Filter.ToString() + "; "
Else
lblStatus.Text = "Loaded panel doesn't have Templates"
End If
End Sub
[C#]
public void Page_Load(Object source, EventArgs e)
{
if(pnl1.DeviceSpecific.Choices[0].HasTemplates)
{
lblStatus.Text ="Loaded panel has " +
pnl1.DeviceSpecific.Choices[0].Templates.Count +
" Templates. For Filter named " +
pnl1.DeviceSpecific.Choices[0].Filter"";
}
else
{
lblStatus.Text = "Loaded panel doesn't have Templates";
}
}
Voir aussi
S'applique à : DeviceSpecificChoice, classe