Xceed Ultimate ListBox for Silverlight Documentation
Filter Event
Example 


Raised for each item in the data source that has not already been excluded by a filter expression to determine if it passes a filter.
Syntax
Dim instance As ListBox
Dim handler As EventHandler(Of ListBoxFilterEventArgs)
 
AddHandler instance.Filter, handler
Event Data

The event handler receives an argument of type ListBoxFilterEventArgs containing data related to this event. The following ListBoxFilterEventArgs properties provide information specific to this event.

PropertyDescription
Accepted true if the item passes the filter; false otherwise. By default, true.
The item to inspect.
Item The item to inspect.
Remarks
The Filter event is executed locally, meaning that all items will be retrieved from the server in order to determine those that pass the filter.
Example
Private Sub ListBox_Filter( ByVal sender As Object, ByVal e As ListBoxFilterEventArgs )
   Dim order As Order = CType( e.Item, Order )
 
   If order Is Nothing Then
      e.Accepted = False
   Else
      e.Accepted = ( order.ShippedDate > order.RequiredDate )
   End If
End Sub
private void ListBox_Filter( object sender, ListBoxFilterEventArgs e )
{
   Order order = e.Item as Order;
 
   if( order == null )
   {
      e.Accepted = false;
   }
   else
   {
      e.Accepted = ( order.ShippedDate > order.RequiredDate );
   }
}
Requirements

Target Platforms: 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

ListBox Class
ListBox Members

Send Feedback