# C1.WPF.C1ListBox

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_WPF_C1ListBox" data-uid="C1.WPF.C1ListBox" class="text-break">C1ListBox Class
</h1>
  <div class="markdown level0 summary"><p>List of items which can be used with heavy templates and preview template to scroll quickly.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.threading.dispatcherobject">DispatcherObject</a></div>
    <div class="level2"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.dependencyobject">DependencyObject</a></div>
    <div class="level3"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.visual">Visual</a></div>
    <div class="level4"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.uielement">UIElement</a></div>
    <div class="level5"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement">FrameworkElement</a></div>
    <div class="level6"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.control">Control</a></div>
    <div class="level7"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.itemscontrol">ItemsControl</a></div>
    <div class="level8"><a class="xref" href="C1.WPF.C1ItemsControl.html">C1ItemsControl</a></div>
    <div class="level9"><a class="xref" href="C1.WPF.C1ListViewer.html">C1ListViewer</a></div>
    <div class="level10"><span class="xref">C1ListBox</span></div>
      <div class="level11"><a class="xref" href="C1.WPF.C1TileListBox.html">C1TileListBox</a></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.animation.ianimatable">IAnimatable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.iframeworkinputelement">IFrameworkInputElement</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.iinputelement">IInputElement</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.isupportinitialize">ISupportInitialize</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.markup.iqueryambient">IQueryAmbient</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.markup.iaddchild">IAddChild</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.primitives.icontainitemstorage">IContainItemStorage</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.inotifypropertychanged">INotifyPropertyChanged</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.WPF.html">C1.WPF</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.4.6.2.dll</h6>
  <h5 id="C1_WPF_C1ListBox_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[StyleTypedProperty(Property = &quot;ItemContainerStyle&quot;, StyleTargetType = typeof(C1ListBoxItem))]
public class C1ListBox : C1ListViewer, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild, IContainItemStorage, INotifyPropertyChanged</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;StyleTypedProperty(Property:=&quot;ItemContainerStyle&quot;, StyleTargetType:=GetType(C1ListBoxItem))&gt;
Public Class C1ListBox
    Inherits C1ListViewer
    Implements IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild, IContainItemStorage, INotifyPropertyChanged</code></pre>
  </div>
  <h5 id="C1_WPF_C1ListBox_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>This control supports selection by cross-slide gesture.</p>
</div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_C1ListBox__ctor" data-uid="C1.WPF.C1ListBox.#ctor">
          <a class="xref" href="C1.WPF.C1ListBox.-ctor.html#C1_WPF_C1ListBox__ctor">C1ListBox()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of a <a class="xref" href="C1.WPF.C1ListBox.html">C1ListBox</a>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="fields">Fields
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_C1ListBox_MouseOverBrushProperty" data-uid="C1.WPF.C1ListBox.MouseOverBrushProperty">
          <a class="xref" href="C1.WPF.C1ListBox.MouseOverBrushProperty.html">MouseOverBrushProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.C1ListBox.MouseOverBrush.html#C1_WPF_C1ListBox_MouseOverBrush">MouseOverBrush</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1ListBox_SelectedBackgroundProperty" data-uid="C1.WPF.C1ListBox.SelectedBackgroundProperty">
          <a class="xref" href="C1.WPF.C1ListBox.SelectedBackgroundProperty.html">SelectedBackgroundProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.C1ListBox.SelectedBackground.html#C1_WPF_C1ListBox_SelectedBackground">SelectedBackground</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1ListBox_SelectedItemProperty" data-uid="C1.WPF.C1ListBox.SelectedItemProperty">
          <a class="xref" href="C1.WPF.C1ListBox.SelectedItemProperty.html">SelectedItemProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.C1ListBox.SelectedItem.html#C1_WPF_C1ListBox_SelectedItem">SelectedItem</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1ListBox_SelectedItemsProperty" data-uid="C1.WPF.C1ListBox.SelectedItemsProperty">
          <a class="xref" href="C1.WPF.C1ListBox.SelectedItemsProperty.html">SelectedItemsProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.C1ListBox.SelectedItems.html#C1_WPF_C1ListBox_SelectedItems">SelectedItems</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1ListBox_SelectionModeProperty" data-uid="C1.WPF.C1ListBox.SelectionModeProperty">
          <a class="xref" href="C1.WPF.C1ListBox.SelectionModeProperty.html">SelectionModeProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.C1ListBox.SelectionMode.html#C1_WPF_C1ListBox_SelectionMode">SelectionMode</a> dependency property.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_C1ListBox_MouseOverBrush" data-uid="C1.WPF.C1ListBox.MouseOverBrush">
          <a class="xref" href="C1.WPF.C1ListBox.MouseOverBrush.html#C1_WPF_C1ListBox_MouseOverBrush">MouseOverBrush</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.brush">Brush</a> used to highlight the control when it has the mouse over.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1ListBox_SelectedBackground" data-uid="C1.WPF.C1ListBox.SelectedBackground">
          <a class="xref" href="C1.WPF.C1ListBox.SelectedBackground.html#C1_WPF_C1ListBox_SelectedBackground">SelectedBackground</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.brush">Brush</a> used to highlight the control when it is selected.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1ListBox_SelectedItem" data-uid="C1.WPF.C1ListBox.SelectedItem">
          <a class="xref" href="C1.WPF.C1ListBox.SelectedItem.html#C1_WPF_C1ListBox_SelectedItem">SelectedItem</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or set the item which is selected.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1ListBox_SelectedItems" data-uid="C1.WPF.C1ListBox.SelectedItems">
          <a class="xref" href="C1.WPF.C1ListBox.SelectedItems.html#C1_WPF_C1ListBox_SelectedItems">SelectedItems</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or set the list of items which are selected.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1ListBox_SelectionMode" data-uid="C1.WPF.C1ListBox.SelectionMode">
          <a class="xref" href="C1.WPF.C1ListBox.SelectionMode.html#C1_WPF_C1ListBox_SelectionMode">SelectionMode</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets if selection is disabled, single, multiple, or extended.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_C1ListBox_ClearSelection" data-uid="C1.WPF.C1ListBox.ClearSelection">
          <a class="xref" href="C1.WPF.C1ListBox.ClearSelection.html#C1_WPF_C1ListBox_ClearSelection">ClearSelection()</a>
        </td>
        <td class="markdown level1 summary"><p>Clears the selection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1ListBox_GetContainerForItemOverride" data-uid="C1.WPF.C1ListBox.GetContainerForItemOverride">
          <a class="xref" href="C1.WPF.C1ListBox.GetContainerForItemOverride.html#C1_WPF_C1ListBox_GetContainerForItemOverride">GetContainerForItemOverride()</a>
        </td>
        <td class="markdown level1 summary"><p>Creates or identifies the element that is used to display the given item.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1ListBox_InitializePanel" data-uid="C1.WPF.C1ListBox.InitializePanel">
          <a class="xref" href="C1.WPF.C1ListBox.InitializePanel.html#C1_WPF_C1ListBox_InitializePanel">InitializePanel()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes the panel.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1ListBox_IsItemItsOwnContainerOverride_System_Object_" data-uid="C1.WPF.C1ListBox.IsItemItsOwnContainerOverride(System.Object)">
          <a class="xref" href="C1.WPF.C1ListBox.IsItemItsOwnContainerOverride.html#C1_WPF_C1ListBox_IsItemItsOwnContainerOverride_System_Object_">IsItemItsOwnContainerOverride(object)</a>
        </td>
        <td class="markdown level1 summary"><p>Determines if the specified item is (or is eligible to be) its own container.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1ListBox_OnItemTapped_System_Object_C1_WPF_C1TappedEventArgs_" data-uid="C1.WPF.C1ListBox.OnItemTapped(System.Object,C1.WPF.C1TappedEventArgs)">
          <a class="xref" href="C1.WPF.C1ListBox.OnItemTapped.html#C1_WPF_C1ListBox_OnItemTapped_System_Object_C1_WPF_C1TappedEventArgs_">OnItemTapped(object, C1TappedEventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Called when one of the items is tapped.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1ListBox_OnItemsChanged_System_Collections_Specialized_NotifyCollectionChangedEventArgs_" data-uid="C1.WPF.C1ListBox.OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs)">
          <a class="xref" href="C1.WPF.C1ListBox.OnItemsChanged.html#C1_WPF_C1ListBox_OnItemsChanged_System_Collections_Specialized_NotifyCollectionChangedEventArgs_">OnItemsChanged(NotifyCollectionChangedEventArgs)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_WPF_C1ListBox_OnSelectionChanged_System_Object_C1_WPF_SelectionChangedEventArgs_System_Int32__" data-uid="C1.WPF.C1ListBox.OnSelectionChanged(System.Object,C1.WPF.SelectionChangedEventArgs{System.Int32})">
          <a class="xref" href="C1.WPF.C1ListBox.OnSelectionChanged.html#C1_WPF_C1ListBox_OnSelectionChanged_System_Object_C1_WPF_SelectionChangedEventArgs_System_Int32__">OnSelectionChanged(object, SelectionChangedEventArgs&lt;int&gt;)</a>
        </td>
        <td class="markdown level1 summary"><p>Called when the selection changed.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1ListBox_PrepareContainerForItemOverride_System_Windows_DependencyObject_System_Object_" data-uid="C1.WPF.C1ListBox.PrepareContainerForItemOverride(System.Windows.DependencyObject,System.Object)">
          <a class="xref" href="C1.WPF.C1ListBox.PrepareContainerForItemOverride.html#C1_WPF_C1ListBox_PrepareContainerForItemOverride_System_Windows_DependencyObject_System_Object_">PrepareContainerForItemOverride(DependencyObject, object)</a>
        </td>
        <td class="markdown level1 summary"><p>Prepares the specified element to display the specified item.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="events">Events
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_C1ListBox_SelectionChanged" data-uid="C1.WPF.C1ListBox.SelectionChanged">
          <a class="xref" href="C1.WPF.C1ListBox.SelectionChanged.html">SelectionChanged</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when the selection changed.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="extensionmethods">Extension Methods</h3>
  <div>
      <a class="xref" href="C1.WPF.Extensions.FindParent.html#C1_WPF_Extensions_FindParent__1_System_Windows_FrameworkElement_">Extensions.FindParent&lt;T&gt;(FrameworkElement)</a>
  </div>
  <div>
      <a class="xref" href="C1.WPF.Extensions.GetAllParents.html#C1_WPF_Extensions_GetAllParents_System_Windows_FrameworkElement_">Extensions.GetAllParents(FrameworkElement)</a>
  </div>
  <div>
      <a class="xref" href="C1.WPF.Extensions.GetVisualStateGroup.html#C1_WPF_Extensions_GetVisualStateGroup_System_Windows_FrameworkElement_System_String_">Extensions.GetVisualStateGroup(FrameworkElement, string)</a>
  </div>
  <div>
      <a class="xref" href="C1.WPF.Extensions.SetBinding.html#C1_WPF_Extensions_SetBinding__1_System_Windows_FrameworkElement_System_Windows_DependencyProperty___0_System_Linq_Expressions_Expression_System_Func___0_System_Object___">Extensions.SetBinding&lt;T&gt;(FrameworkElement, DependencyProperty, T, Expression&lt;Func&lt;T, object&gt;&gt;)</a>
  </div>
  <div>
      <a class="xref" href="C1.WPF.Extensions.SetBinding.html#C1_WPF_Extensions_SetBinding__1_System_Windows_FrameworkElement_System_Windows_DependencyProperty___0_System_Linq_Expressions_Expression_System_Func___0_System_Object___System_Windows_Data_IValueConverter_">Extensions.SetBinding&lt;T&gt;(FrameworkElement, DependencyProperty, T, Expression&lt;Func&lt;T, object&gt;&gt;, IValueConverter)</a>
  </div>
  <div>
      <a class="xref" href="C1.WPF.Extensions.C1TransformToVisual.html#C1_WPF_Extensions_C1TransformToVisual_System_Windows_UIElement_System_Windows_UIElement_">Extensions.C1TransformToVisual(UIElement, UIElement)</a>
  </div>

</div>
