Xceed Toolkit Plus for WPF v5.0 Documentation
Xceed.Wpf.ListBox Assembly / Xceed.Wpf.ListBox Namespace / ListBoxItem Class
Members


In This Topic
    ListBoxItem Class
    In This Topic

    Represents a selectable item in the ListBox.

    Syntax
    'Declaration
     
    <TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")>
    <StyleTypedPropertyAttribute(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)>
    <XmlLangPropertyAttribute("Language")>
    <UsableDuringInitializationAttribute(True)>
    <RuntimeNamePropertyAttribute("Name")>
    <UidPropertyAttribute("Uid")>
    <TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)>
    <NameScopePropertyAttribute("NameScope", System.Windows.NameScope)>
    Public Class ListBoxItem 
       Inherits ListBoxContainer
       Implements Xceed.Wpf.DragDrop.IProvideDraggedContentPresenter 
    'Usage
     
    Dim instance As ListBoxItem
    [TemplateVisualState(GroupName="CommonStates", Name="Disabled")]
    [StyleTypedProperty(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)]
    [XmlLangProperty("Language")]
    [UsableDuringInitialization(true)]
    [RuntimeNameProperty("Name")]
    [UidProperty("Uid")]
    [TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
    [NameScopeProperty("NameScope", System.Windows.NameScope)]
    public class ListBoxItem : ListBoxContainer, Xceed.Wpf.DragDrop.IProvideDraggedContentPresenter  
    Remarks

    An instance of this class is instantiated through ListBoxItemConfiguration.

    A ListBox contains a collection of ListBoxItem objects. To select a ListBoxItem in a ListBox, set its IsSelected property to true.

    Bind a ListBoxItem to data by binding the ItemsSource property of the listbox that contains it to a data source.

    You can customize the appearance of a ListBoxItem by setting the ItemTemplate property to a DataTemplate

    Inheritance Hierarchy

    System.Object
       System.Windows.Threading.DispatcherObject
          System.Windows.DependencyObject
             System.Windows.Media.Visual
                System.Windows.UIElement
                   System.Windows.FrameworkElement
                      System.Windows.Controls.Control
                         Xceed.Wpf.ListBox.ListBoxContainer
                            Xceed.Wpf.ListBox.ListBoxItem

    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also