Created
May 22, 2013 08:17
This file contains 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
open System | |
open System.Drawing | |
open MonoTouch.UIKit | |
open MonoTouch.Foundation | |
open ReachingNirvana.Core | |
open Cirrious.MvvmCross.Binding | |
open Cirrious.MvvmCross.Binding.BindingContext | |
open Cirrious.MvvmCross.Touch.Views | |
[<Register ("FirstView")>] | |
type FirstView () = | |
inherit MvxViewController () | |
let label = new UILabel() | |
let textBox = new UITextField() | |
override this.ViewDidLoad () = | |
base.ViewDidLoad () | |
label.Frame <- new RectangleF((float32)0,(float32)0,(float32)320,(float32)50) | |
this.Add(label) | |
textBox.Frame <- new RectangleF((float32)0,(float32)70,(float32)320,(float32)50) | |
this.Add(textBox) | |
let set = MvxBindingContextOwnerExtensions.CreateBindingSet<FirstView,FirstViewModel>(this) | |
set.Bind(label).To("Hello") |> ignore | |
set.Bind(textBox).To("Hello") |> ignore | |
set.Apply() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment