Event.filter<'T,'Del> Function (F#)
Returns a new event that listens to the original event and triggers the resulting event only when the argument to the event passes the given function.
Namespace/Module Path: Microsoft.FSharp.Control.Event
Assembly: FSharp.Core (in FSharp.Core.dll)
// Signature: Event.filter : ('T -> bool) -> IEvent<'Del,'T> -> IEvent<'T> (requires delegate) // Usage: Event.filter predicate sourceEvent
The following code example shows how to use the Event.filter function. In this example, mouse events are passed on only when the mouse pointer is in a certain region.