Proprietà LabelStyle

Imposta o restituisce lo stile utilizzato per l'etichetta dell'intestazione.

public style LabelStyle {
   get,
   set
}

Osservazioni

Se la proprietà è impostata a livello di codice, non viene mantenuta a meno che non sia impostata in modo dinamico a ogni richiesta. Se la proprietà viene impostata in modo dichiarativo, viene impostata a ogni richiesta.

Esempio

Nell'esempio che segue viene illustrato come utilizzare la proprietà LabelStyle per specificare Style1 come stile del controllo ObjectList.

Sub ShowTaskDetail1(sender As Object, e As ObjectListSelectEventArgs)
   
   ObjectList1.LabelStyle = StyleSheet1("Style1")
 
End Sub

<mobile:ObjectList id="ObjectList1" OnItemSelect="ShowTaskDetail1" runat="server" LabelStyle-StyleReference="title"     CommandStyle-StyleReference="subcommand">
</mobile:ObjectList>
<mobile:StyleSheet id="StyleSheet1" runat="server">
  <Style Name="Style1" Font-Size="Large" Font-Name="Arial"
     Font-Bold="true"  ForeColor="Red" Font-Italic="True"
     Wrapping="Wrap">
  </Style>
</mobile:StyleSheet>

[C#]

void ShowTaskDetail1(Object sender, ObjectListSelectEventArgs e)
{
  ObjectList1.LabelStyle = StyleSheet1["Style1"];
}

<mobile:ObjectList id="ObjectList1" OnItemSelect="ShowTaskDetail1" runat="server" LabelStyle-StyleReference="title"     CommandStyle-StyleReference="subcommand">
</mobile:ObjectList>
<mobile:StyleSheet id="StyleSheet1" runat="server">
  <Style Name="Style1" Font-Size="Large" Font-Name="Arial"
     Font-Bold="true"  ForeColor="Red" Font-Italic="True"
     Wrapping="Wrap">
  </Style>
</mobile:StyleSheet>

Vedere anche

Si applica a: classe ObjectList