Xceed Toolkit Plus for WPF v4.6 Documentation
ToItem Method
Example 


Xceed.Wpf.ListBox Assembly > Xceed.Wpf.ListBox Namespace > SelectionRange.EndRangeDictionary Class : ToItem Method
An object representing the item at which to end the selection range.
Specifies the item at which to end the selection range.
Syntax
'Declaration
 
Public Sub ToItem( _

   ByVal item As Object _

) 
'Usage
 
Dim instance As SelectionRange.EndRangeDictionary

Dim item As Object

 

instance.ToItem(item)
public void ToItem( 

   object item

)

Parameters

item
An object representing the item at which to end 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.

The item specified by the ToItem method will be the new selected item (see SelectedItem property).

Example
For more information and examples on selecting data, refer to the Selecting Data topic.
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 );
Requirements

Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

SelectionRange.EndRangeDictionary Class
SelectionRange.EndRangeDictionary Members