Visual Basic (Declaration)
<TemplateVisualStateAttribute(Name := "Normal", GroupName := "CommonStates")> _
<TemplateVisualStateAttribute(Name := "Focused", GroupName := "FocusStates")> _
<TemplateVisualStateAttribute(Name := "MouseOver", GroupName := "CommonStates")> _
<TemplateVisualStateAttribute(Name := "Disabled", GroupName := "CommonStates")> _
<TemplateVisualStateAttribute(Name := "Unselected", GroupName := "SelectionStates")> _
<TemplateVisualStateAttribute(Name := "Selected", GroupName := "SelectionStates")> _
<TemplateVisualStateAttribute(Name := "SelectedUnfocused", GroupName := "SelectionStates")> _
<TemplateVisualStateAttribute(Name := "Unfocused", GroupName := "FocusStates")> _
Public Class ListBoxItem _
Inherits ContentControl
Dim instance As ListBoxItem
[TemplateVisualStateAttribute(Name = "Normal", GroupName = "CommonStates")]
[TemplateVisualStateAttribute(Name = "Focused", GroupName = "FocusStates")]
[TemplateVisualStateAttribute(Name = "MouseOver", GroupName = "CommonStates")]
[TemplateVisualStateAttribute(Name = "Disabled", GroupName = "CommonStates")]
[TemplateVisualStateAttribute(Name = "Unselected", GroupName = "SelectionStates")]
[TemplateVisualStateAttribute(Name = "Selected", GroupName = "SelectionStates")]
[TemplateVisualStateAttribute(Name = "SelectedUnfocused", GroupName = "SelectionStates")]
[TemplateVisualStateAttribute(Name = "Unfocused", GroupName = "FocusStates")]
public class ListBoxItem : ContentControl
XAML Object Element Usage
<ListBoxItem .../>
-or-
<listboxitem ...>
content
</listboxitem>