anchor.diff:      | :? 'a as y -> Some y
       | _ -> None
   
  +(**
  +The app event type - adding, removing and selecting an item
  +*)
  +
   type Events = Add | Remove | SelectionChanged of ItemModel option
  +(**
  +ItemModel itself is defined here, containing a string property. As it won't change, this is a plain property, not a ReactiveProperty<string>.
   
  +We also override ToString() to avoid defining a template for the sake of the tutorial.
  +*)
   and ItemModel(s) =
  -    member val Text = ReactiveProperty(s)
  -    override x.ToString() = x.Text.Value
  -
  +    member val Text = s
  +    override x.ToString() = x.Text
  +(**
  +The concrete WPF window type - this should be replaced by a .xaml loaded by FsXaml in the real world.
  +*)
   type ListViewWindow() as x =
       inherit Window()
       let label = Label()
  -    let button = Button(Content="Add")
  +    let button = Button(Content="Add Item")
       let list = ListBox()
       do
           let sp = StackPanel()
  
positive.code:     member val Button = button
      member val List = list
  
  
  type ItemView(m) =
      inherit View<Events, Label, ItemModel>(Label(), m)
       override x.EventStreams = []
       override x.SetBindings m = x.Root.Content <- m.Text.Value
  
  type ListModel() =
      member val Items = new ObservableCollection<ItemModel>()
      member val SelectedItem = new ReactiveProperty<ItemModel option>(None)
      
  type ListView(elt, m) =
      inherit DerivedCollectionSourceView<Events, ListViewWindow, ListModel>(elt, m)
  
      override x.EventStreams = [
          elt.Button.Click --> Add
          elt.List.SelectionChanged |> Observable.map (fun _ -> SelectionChanged((cast<ItemView> elt.List.SelectedItem |> Option.map(fun v -> v.Model))))]
      override x.SetBindings m =
          let collview = x.linkCollection elt.List (fun i -> ItemView(i)) m.Items
          m.SelectedItem |> Observable.add (fun i -> elt.Label.Content <- sprintf "Selection: %A" i)
          ()
  type ListController() =
      interface IDispatcher<Events,ListModel> with
          member this.InitModel m = ()
          member this.Dispatcher = 
              function
              | Add -> Sync (fun m -> m.Items.Add (ItemModel(sprintf "#%i" m.Items.Count)))
              | Remove -> failwith "Not implemented yet"
              | SelectionChanged item -> printfn "%A" item; Sync (fun m -> m.SelectedItem.Value <- item)
  
  let app = if Application.Current = null then Application() else Application.Current
  let lm = ListModel()
  let v = ListView(new ListViewWindow(),lm)
  let c = ListController()
  
negative.code: open FSharp.Qualia.WPF
  
  (**
  WPF Collections tutorial
  ========================
  
  The resulting app will contain a listbox, an 'Add Item' button, and label displaying the current selection and will delete the selected item when pressing the Delete key.
  
  First, a small helper used for the ListBox.SelectedItem:
  
  *)
  
  let cast<'a> (x:obj) : 'a option =
  