Exportar (0) Imprimir
Expandir todo

FilterEventArgs (Clase)

Provides information and event data that is associated with the Filter event.

Espacio de nombres: System.Windows.Data
Ensamblado: PresentationFramework (en presentationframework.dll)
Espacio de nombres XML:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public class FilterEventArgs : EventArgs
public class FilterEventArgs extends EventArgs
public class FilterEventArgs extends EventArgs
No se puede utilizar esta clase administrada en XAML.

The following example shows how to set an event handler for the Filter event. In this example, listingDataView is an instance of CollectionViewSource.

listingDataView.Filter += new FilterEventHandler(ShowOnlyBargainsFilter);

The following example shows the implementation of the example ShowOnlyBargainsFilter filter event handler. This event handler uses the Accepted property to filter out AuctionItem objects that have a CurrentPrice of $25.00 or greater.

private void ShowOnlyBargainsFilter(object sender, FilterEventArgs e)
{
    AuctionItem product = e.Item as AuctionItem;
    if (product != null)
    {
        // Filter out products with price 25 or above
        if (product.CurrentPrice < 25)
        {
            e.Accepted = true;
        }
        else
        {
            e.Accepted = false;
        }
    }
}

For the complete example, see Data Binding Demo.

System.Object
   System.EventArgs
    System.Windows.Data.FilterEventArgs

Los miembros estáticos públicos (Shared en Visual Basic) de este tipo son seguros para la ejecución de subprocesos. No se garantiza que los miembros de instancias sean seguros para la ejecución de subprocesos.

Microsoft .NET Framework 3.0 es compatible con Windows Vista, Microsoft Windows XP SP2 y Windows Server 2003 SP1.

.NET Framework

Compatible con: 3.0

Adiciones de comunidad

AGREGAR
Mostrar:
© 2014 Microsoft