It's available as 3.0.9-beta - so will only be shown if you have the prerelease flag set.
It's a bit hard to explain what's in this beta version right now - I'm away from the home office again this week...
The big new things are that there are a couple of new packages which enable binding to methods and to fields... so right now I'm looking at a ViewModel which looks like:
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
public class Person | |
{ | |
public INC<string> FirstName = new NC<string>("Fred"); | |
public INC<string> LastName= new NC<string>("Flintstone"); | |
} | |
public class FirstViewModel | |
: MvxViewModel | |
{ | |
public INC<string> Updating = new NC<string>("Laugh"); | |
public INC<Person> Child = new NC<Person>(new Person()); | |
public void Go() | |
{ | |
Updating.Value = "Whippy"; | |
var person = new Person(); | |
person.FirstName.Value = "James"; | |
person.LastName.Value = "Bob"; | |
Child.Value = person; | |
} | |
} |
Within a Droid UI this can be bound to as:
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
<?xml version="1.0" encoding="utf-8"?> | |
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:local="http://schemas.android.com/apk/res-auto" | |
android:orientation="vertical" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent"> | |
<LinearLayout | |
android:orientation="vertical" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent"> | |
<EditText | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content" | |
android:textSize="30dp" | |
local:MvxBind="Text Updating" | |
/> | |
<TextView | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content" | |
android:textSize="30dp" | |
local:MvxBind="Text Updating" | |
/> | |
<EditText | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content" | |
android:textSize="30dp" | |
local:MvxBind="Text Child.FirstName" | |
/> | |
<TextView | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content" | |
android:textSize="30dp" | |
local:MvxBind="Text Child.FirstName" | |
/> | |
<EditText | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content" | |
android:textSize="30dp" | |
local:MvxBind="Text Child.LastName" | |
/> | |
<TextView | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content" | |
android:textSize="30dp" | |
local:MvxBind="Text Child.LastName" | |
/> | |
<Button | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content" | |
android:text="Go" | |
local:MvxBind="Click Go" | |
/> | |
</LinearLayout> | |
</ScrollView> |
I will be back with more info 'soon'... just working too hard!
Have fun out there :)
Great, Slodge! Arming with new toys ;)
ReplyDeleteI still need to check work command with CommandParameter in new release.
Thanks!
looks nice :)
ReplyDeleteVery interesting, I'm speculating but presumably NC is Notify Change and you've found a way of hiding the RaisePropertyChanged ceremony?
ReplyDelete