Search code examples
xamarinxamarin.androidmvvmcross

MvvmCross android binding to fragment


is there any way to bind in layout directly to custom fragment? ie:

<fragment       android:id="@+id/AwesomeFragment"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                local:MvxBind="CustomTarget PropertyInVM;" class="My.Awesome.Fragment" />

CustomTarget is CustomTargetBinding


Solution

  • So how you can do this:

    1. create custom control with properties you need
    2. create target bindings
    3. place custom control into layout instead of your fragment
    4. bind from layout