fsprojects-archive / zzarchive-FSharp.Desktop.UI

F# MVC framework for WPF.
http://fsprojects.github.io/FSharp.Desktop.UI/
Other
81 stars 21 forks source link

SetBindings and DataContext #5

Closed StefanBelo closed 10 years ago

StefanBelo commented 10 years ago

DataContext should be set before SetBindings otherwise in initial binding there is a lot of errors:

System.Windows.Data Error: 40 : BindingExpression path error: 'ToDate' property not found on 'object' ''MainModelProxy' (HashCode=10737664)'. BindingExpression:Path=ToDate; DataItem='MainModelProxy' (HashCode=10737664); target element is 'DateEdit' (Name='deToDate'); target property is 'EditValue' (type 'Object')

    member this.SetBindings model = 
        root.DataContext <- model
        this.SetBindings model
dmitry-a-morozov commented 10 years ago

fixed in 0.4.0-beta