/observable-property

Observable properties for the model layer, based on Rx.NET.

Primary LanguageF#MIT LicenseMIT

observable-property

Build status Build Status

An Rx.NET-based data binding with first-class bindable properties.

Example

open System.Reactive.Property
open System.Reactive.Property.Operators

type FooBar() =
	// create an observable property
	member val Fred = newP 0 with get

let foo = FooBar()

// observe changes
use _ = foo.Fred.WhenValueSet.Subscribe(fun x -> printfn "value changed: %A" x)

// assign new value
foo.Fred <~ 5		//> value changed: 5

// access current value
printfn "%d" <| 5 + !!foo.Fred