

'Declaration<TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")> <TemplatePartAttribute(Name="ScrollViewer", Type=System.Windows.Controls.ScrollViewer)> <ContentPropertyAttribute("Items")> <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 ListBox Inherits System.Windows.Controls.Control Implements Xceed.Wpf.Controls.IDataNavigationHost, Xceed.Wpf.DragDrop.IDropTarget
'UsageDim instance As ListBox
[TemplateVisualState(GroupName="CommonStates", Name="Disabled")] [TemplatePart(Name="ScrollViewer", Type=System.Windows.Controls.ScrollViewer)] [ContentProperty("Items")] [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 ListBox : System.Windows.Controls.Control, Xceed.Wpf.Controls.IDataNavigationHost, Xceed.Wpf.DragDrop.IDropTarget
The ListBox is a control that displays a collection of items. More than one item in a ListBox is visible at a time. Whether the ListBox allows multiple selections is set by using the SelectionMode property.
Its content is set using the Items or ItemsSource properties.
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.ListBox.Views.ListBoxView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer" xmlns:xclb="http://schemas.xceed.com/wpf/xaml/listbox" xmlns:xclt="http://schemas.xceed.com/wpf/xaml/listbox/themes" xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.ListBox.Converters" xmlns:sys="clr-namespace:System;assembly=mscorlib" VerticalScrollBarVisibility="Disabled" Title="ListBox"> <local:DemoView.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="../ItemTemplates/ItemTemplates.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </local:DemoView.Resources> <Grid> <xclb:ListBox ItemsSource="{Binding}" ItemTemplate="{StaticResource productListBoxItemTemplate}" ToolPaneVisibility="Collapsed"> <xclb:ListBox.Resources> <xclt:MetroLightThemeResourceDictionary AccentColor="Orange" /> </xclb:ListBox.Resources> </xclb:ListBox> </Grid > </local:DemoView>
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.ListBox
| Name | Description | |
|---|---|---|
![]() | ListBox Constructor | Initializes a new instance of the ListBox class. |
| Name | Description | |
|---|---|---|
![]() | FindLogicalAncestor<T> | Finds the logical ancenster |
![]() | FindLogicalAncestorsAndSelf | |
![]() | FindLogicalChildren<T> | Find the logical children. |
![]() | FindVisualAncestor<T> | Finds the visual ancestor. |
![]() | FindVisualChildren<T> | Finds the visual children. |
![]() | FindVisualTreeRoot | Finds the visual tree root. |
![]() | ShowDialog | Overloaded. |
.NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.
.NET Framework: net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.