Xceed Toolkit Plus for WPF v5.1 Documentation
Xceed.Wpf.ListBox Assembly / Xceed.Wpf.ListBox Namespace / SelectionRange.StartRangeDictionary Class / FromItem Method
An object representing the item from which to start the selection range.
Example


In This Topic
    FromItem Method
    In This Topic
    Specifies the item from which to start the selection range.
    Syntax
    'Declaration
     
    
    Public Sub FromItem( _
       ByVal item As Object _
    ) 
    'Usage
     
    
    Dim instance As SelectionRange.StartRangeDictionary
    Dim item As Object
     
    instance.FromItem(item)
    public void FromItem( 
       object item
    )

    Parameters

    item
    An object representing the item from which to start the selection range.
    Remarks
    When specifying a start and end item as the selection range, the items will be selected according to their position in the data source and not how they are displayed on screen. This means that all items between the start and end items will be selected, regardless of where the start and end items are located visually.
    Example
     
    Dim range As New SelectionRange()
    
    range.StartRangeInfos.FromItem( Me.People[ 5 ] )
    range.EndRangeInfos.ToItem( Me.People[ 10 ] )
    
    Me.sllbListBox.SelectedRanges.Add( range )
    SelectionRange range = new SelectionRange();
    
    range.StartRangeInfos.FromItem( this.People[ 5 ] );
    range.EndRangeInfos.ToItem( this.People[ 10 ] ); 
    
    this.sllbListBox.SelectedRanges.Add( range );
    Supported Frameworks

    .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.

    See Also