Share via


Observable.FromEvent<TEventArgs> Method (Action<EventHandler<TEventArgs>>, Action<EventHandler<TEventArgs>>)

Namespace:  Microsoft.Phone.Reactive
Assembly:  Microsoft.Phone.Reactive (in Microsoft.Phone.Reactive.dll)

Syntax

'Declaration
Public Shared Function FromEvent(Of TEventArgs As EventArgs) ( _
    addHandler As Action(Of EventHandler(Of TEventArgs)), _
    removeHandler As Action(Of EventHandler(Of TEventArgs)) _
) As IObservable(Of IEvent(Of TEventArgs))
public static IObservable<IEvent<TEventArgs>> FromEvent<TEventArgs>(
    Action<EventHandler<TEventArgs>> addHandler,
    Action<EventHandler<TEventArgs>> removeHandler
)
where TEventArgs : EventArgs
public:
generic<typename TEventArgs>
where TEventArgs : EventArgs 
static IObservable<IEvent<TEventArgs>^>^ FromEvent(
    Action<EventHandler<TEventArgs>^>^ addHandler, 
    Action<EventHandler<TEventArgs>^>^ removeHandler
)
static member FromEvent : 
        addHandler:Action<EventHandler<'TEventArgs>> * 
        removeHandler:Action<EventHandler<'TEventArgs>> -> IObservable<IEvent<'TEventArgs>>  when 'TEventArgs : EventArgs

Type Parameters

  • TEventArgs

Parameters

Return Value

Type: System.IObservable<IEvent<TEventArgs>>

Version Information

.NET for Windows Phone apps

Supported in: Windows Phone 8, Silverlight 8.1

.NET Framework Security

See Also

Reference

Observable Class

FromEvent Overload

Microsoft.Phone.Reactive Namespace