Created
August 27, 2018 18:13
-
-
Save willsam100/99ea47b818c18b49ef2be5d1e6a7e5c1 to your computer and use it in GitHub Desktop.
F# Simple View Model Base
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace YourNameSpaceHere | |
open System.ComponentModel | |
type ViewModelBase() = | |
let propertyChanged = new Event<_, _>() | |
interface INotifyPropertyChanged with | |
[<CLIEvent>] | |
member this.PropertyChanged = propertyChanged.Publish | |
member this.OnPropertyChanged(propertyName : string) = | |
propertyChanged.Trigger(this, new PropertyChangedEventArgs(propertyName)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment