Intersoft ClientUI Documentation
ISMultipleSelectionControl Class
Members  See Also  Send Feedback
Intersoft.Client.Framework Namespace : ISMultipleSelectionControl Class






Serves as the base class for all Intersoft Multiple Selection controls.

Object Model

ISMultipleSelectionControl Class

Syntax

Visual Basic (Declaration) 
Public MustInherit Class ISMultipleSelectionControl 
   Inherits ISSelectionControl
   Implements IControlIFrameworkIMultipleSelectionISelection 
Visual Basic (Usage)Copy Code
Dim instance As ISMultipleSelectionControl
C# 
public abstract class ISMultipleSelectionControl : ISSelectionControl, IControlIFrameworkIMultipleSelectionISelection  
Delphi 
public class ISMultipleSelectionControl = class(ISSelectionControl, IControl, IFramework, IMultipleSelection, ISelection)abstract; 
JScript 
public abstract class ISMultipleSelectionControl extends ISSelectionControl implements IControlIFrameworkIMultipleSelectionISelection 
Managed Extensions for C++ 
public __gc abstract class ISMultipleSelectionControl : public ISSelectionControl, IControlIFrameworkIMultipleSelectionISelection  
C++/CLI 
public ref class ISMultipleSelectionControl abstract : public ISSelectionControl, IControlIFrameworkIMultipleSelectionISelection  

Remarks

The base class for multiple selection controls in ClientUI is ISMultipleSelectionControl. This class inherits ISSelectionControl and defines SelectedItems property which you can also bind using MVVM pattern. This property indicates the current selected items and also can be used to define the selected items.

When this property is changed, it means that the current selection has changed. Consequently, it will synchronize all selection related properties, including updating the IsSelected property for each item.

You can change the selection by replacing the SelectedItems property, or adding and removing the items from the current SelectedItems collection.

The following example shows how to work with SelectedItems property.

XAML Copy Code
<Intersoft:DockPanel HorizontalAlignment="Center" VerticalAlignment="Center">
        <Intersoft:UXListBox x:Name="ListBox1" HorizontalAlignment="Center" VerticalAlignment="Center" SelectionMode="Extended">
                <Intersoft:UXListBoxItem Content="Item #1" IsSelected="True"/>
                <Intersoft:UXListBoxItem Content="Item #2" IsSelected="True"/>
                <Intersoft:UXListBoxItem Content="Item #3"/>
                <Intersoft:UXListBoxItem Content="Item #4"/>
        </Intersoft:UXListBox>
        <Intersoft:FieldLabel Intersoft:DockPanel.Dock="Top" Header="SelectedIndex">
                <TextBlock Text="{Binding SelectedIndex, ElementName=ListBox1}" Margin="4"/>
        </Intersoft:FieldLabel>
        <Intersoft:FieldLabel Intersoft:DockPanel.Dock="Top" Header="SelectedItem">
                <TextBlock Text="{Binding SelectedItem.Content, ElementName=ListBox1}" Margin="4"/>
        </Intersoft:FieldLabel>
        <Button Intersoft:DockPanel.Dock="Top" Content="Change Selected Items" Margin="4" Click="Button_Click"/>          
</Intersoft:DockPanel>
C# Copy Code
private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
{
    ObservableCollection<object> selectedItems = new ObservableCollection<object>();
    selectedItems.Add(this.ListBox1.Items[0]);
    selectedItems.Add(this.ListBox1.Items[3]);

    this.ListBox1.SelectedItems = selectedItems;
}

This sample demonstrates that when you perform multiple selection, such as by holding Shift or Ctrl key, the SelectedItems property will be updated. You can also change the selected items by changing this SelectedItems property as demonstrated when you click the button.

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

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.