F# has no autoproperty syntax at the moment - I think it would be great.
My solution has been to declare these types of classes in a C# assembly, and ref. the DLL from F#. (I've been doing all WPF work from C# for designer support and writing the logic in F#.)

A record has auto-properties, so you can do this:

1
2
3
  type FloatsType = { _a : float, _b : float ... }
  let MyFloats = { _a = 0, ... }

Then in the binding, bind to "MyFloats._a", "MyFloats._b", etc.

Another solution would be to expose a single array, and just use the binding indexing syntax to bind to various sub-elements of the array, such as "MyFloats[0], MyFloats[1]", etc.

By on 8/5/2010 7:05 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper