Snippets tagged mvvm

  • ObservableObject

    The ObservableObject type implements the INotifyPropertyChanged interface used in WPF and Silverlight to notify on changes to properties that are bound to a control. Specify property names type safely using F# Quotations, i.e. <@ this.PropertyName @> when invoking the NotifyPropertyChanged method. If you are following the MVVM pattern then your View Model class can inherit from the ObservableObject type.

    59 people like this

    Posted: 6 years ago by Phillip Trelford

  • Example of Elm-like immutable MVVM

    An example of a simple ViewModel for WPF inspired by the "immutable" Elm Architecture - It is just an proof of concept. See the library code and a few working examples at

    6 people like this

    Posted: 6 months ago by Zdenek Pavlis

  • Simple F# ViewModel for Silverlight MVVM

    Silverlight default architecture is Model-View-ViewModel. This code gives full design time support for Microsoft Expression Blend. The F# ViewModel is seen as strongly typed data source in the Blend UI. There are two properties binded to the view: HiLabel (OneWay data binding) and MyName (TwoWay data binding). ViewModel implements the INotifyPropertyChanged to support the binding. The view project (HelloApp) is made with Blend (by designers) and it is Silverlight 5.0 project. The view codebehind is c# file and it has only this.DataContext -assignment. The viewmodel project (HelloApp.ViewModel) is F# Silverlight 4.0 library. It is made with VS2010 and F# (by developers). It contains the logical functionality of the current view.

    5 people like this

    Posted: 5 years ago by Tuomas Hietanen