Intersoft ClientUI Documentation
UXListBox Class
Members  See Also  Send Feedback
Intersoft.Client.UI.Aqua.UXCollection Namespace : UXListBox Class






Represents a list control that displays a collection of UXListBoxItem.

Object Model

UXListBox Class

Syntax

Visual Basic (Declaration) 
<TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)>
<TemplatePartAttribute(Name="ScrollViewer", Type=Intersoft.Client.UI.Controls.UXScrollViewer)>
<TemplatePartAttribute(Name="BorderElement", Type=System.Windows.Controls.Border)>
<DescriptionAttribute("Represents a list control that displays a collection of UXListBoxItem.")>
<TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)>
<StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXCollection.UXListBoxItem)>
<StyleTypedPropertyAttribute(Property="ScrollViewerStyle", StyleTargetType=Intersoft.Client.UI.Controls.UXScrollViewer)>
Public Class UXListBox 
   Inherits Intersoft.Client.UI.Controls.Interactivity.ISDragableMultipleSelectionControl
   Implements IControlIFramework, ILicensing, IMultipleSelectionISelectionIDropable 
Visual Basic (Usage)Copy Code
Dim instance As UXListBox
C# 
[TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="ScrollViewer", Type=Intersoft.Client.UI.Controls.UXScrollViewer)]
[TemplatePartAttribute(Name="BorderElement", Type=System.Windows.Controls.Border)]
[DescriptionAttribute("Represents a list control that displays a collection of UXListBoxItem.")]
[TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)]
[StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXCollection.UXListBoxItem)]
[StyleTypedPropertyAttribute(Property="ScrollViewerStyle", StyleTargetType=Intersoft.Client.UI.Controls.UXScrollViewer)]
public class UXListBox : Intersoft.Client.UI.Controls.Interactivity.ISDragableMultipleSelectionControl, IControlIFramework, ILicensing, IMultipleSelectionISelectionIDropable  
JScript 
TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)
TemplatePartAttribute(Name="ScrollViewer", Type=Intersoft.Client.UI.Controls.UXScrollViewer)
TemplatePartAttribute(Name="BorderElement", Type=System.Windows.Controls.Border)
DescriptionAttribute("Represents a list control that displays a collection of UXListBoxItem.")
TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)
StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXCollection.UXListBoxItem)
StyleTypedPropertyAttribute(Property="ScrollViewerStyle", StyleTargetType=Intersoft.Client.UI.Controls.UXScrollViewer)
public class UXListBox extends Intersoft.Client.UI.Controls.Interactivity.ISDragableMultipleSelectionControl implements IControlIFramework, ILicensing, IMultipleSelectionISelectionIDropable 
Managed Extensions for C++ 
[TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="ScrollViewer", Type=Intersoft.Client.UI.Controls.UXScrollViewer)]
[TemplatePartAttribute(Name="BorderElement", Type=System.Windows.Controls.Border)]
[DescriptionAttribute("Represents a list control that displays a collection of UXListBoxItem.")]
[TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)]
[StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXCollection.UXListBoxItem)]
[StyleTypedPropertyAttribute(Property="ScrollViewerStyle", StyleTargetType=Intersoft.Client.UI.Controls.UXScrollViewer)]
public __gc class UXListBox : public Intersoft.Client.UI.Controls.Interactivity.ISDragableMultipleSelectionControl, IControlIFramework, ILicensing, IMultipleSelectionISelectionIDropable  
C++/CLI 
[TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="ScrollViewer", Type=Intersoft.Client.UI.Controls.UXScrollViewer)]
[TemplatePartAttribute(Name="BorderElement", Type=System.Windows.Controls.Border)]
[DescriptionAttribute("Represents a list control that displays a collection of UXListBoxItem.")]
[TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)]
[StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXCollection.UXListBoxItem)]
[StyleTypedPropertyAttribute(Property="ScrollViewerStyle", StyleTargetType=Intersoft.Client.UI.Controls.UXScrollViewer)]
public ref class UXListBox : public Intersoft.Client.UI.Controls.Interactivity.ISDragableMultipleSelectionControl, IControlIFramework, ILicensing, IMultipleSelectionISelectionIDropable  

Example

The following example shows how to create simple list box.

XAML Copy Code
<Intersoft:UXListBox HorizontalAlignment="Center" VerticalAlignment="Center" Width="150" ItemContentType="ContentAndImage">
    <Intersoft:UXListBoxItem Content="Anton" Icon="Anton.jpg"/>
    <Intersoft:UXListBoxItem Content="Brad" Icon="Brad.jpg"/>
    <Intersoft:UXListBoxItem Content="David" Icon="David.jpg"/>
    <Intersoft:UXListBoxItem Content="Duke" Icon="Duke.jpg"/>
    <Intersoft:UXListBoxItem Content="Lisa" Icon="Lisa.jpg"/>
</Intersoft:UXListBox>

Remarks

UXListBox is inherited from ISMultipleSelectionControl, which means it can be used to perform a single selection and multiple selection depending on the mode. For more information about selection control, see ItemsControl Overview and Content Model Overview respectively.

Configuring SelectionMode

UXListBox has three selection modes such as discussed in the following list.

  • Single
    In single mode, you can select only one item at a time.
  • Multiple
    In multiple mode, you can select multiple items. Clicking an unselected item will make it selected and clicking on selected item will make it unselected.
  • Extended
    In extended mode, you can select multiple items using a combination of Ctrl and / or Shift key similar to Windows operating system.

Using Keyboard to Perform Selection

You can navigate between items by using arrow keys in the keyboard. In Single mode, navigating between items will change the selection immediately.

In Multiple mode you, need to use SpaceBar to select or unselect an item. You use arrow keys to navigate between the items in the list box.

Inheritance Hierarchy

System.Object
   System.Windows.DependencyObject
      System.Windows.UIElement
         System.Windows.FrameworkElement
            System.Windows.Controls.Control
               System.Windows.Controls.ItemsControl
                  Intersoft.Client.Framework.ISItemsControl
                     Intersoft.Client.Framework.ISSelectionControl
                        Intersoft.Client.Framework.ISMultipleSelectionControl
                           Intersoft.Client.UI.Controls.Interactivity.ISDragableMultipleSelectionControl
                              Intersoft.Client.UI.Aqua.UXCollection.UXListBox
                                 Intersoft.Client.UI.Aqua.UXCollection.UXVirtualizingListBox

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.