Xceed.Silverlight.ListBox.v2.0 Assembly > Xceed.Silverlight.ListBox Namespace > ListBox Class : Filter Event |
Public Event Filter As EventHandler(Of ListBoxFilterEventArgs)
Dim instance As ListBox Dim handler As EventHandler(Of ListBoxFilterEventArgs) AddHandler instance.Filter, handler
public event EventHandler<ListBoxFilterEventArgs> Filter
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.
Property | Description |
---|---|
Accepted | true if the item passes the filter; false otherwise. By default, true. The item to inspect. |
Item | The item to inspect. |
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 ); } }
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