FANDOM


How to bind to a commandEdit

A binding is used to connect a control property to a model property. Binding as then used to move the data in the one property to the other property.

The current implementation of TeaLight allows for for binding of data properties and command properties. The implementations are on different levels per platform.

Levels:

  1. Not implemented
  2.  Rendering SourcePropertyPath and Mode
  3. Render all



AndroidEdit

Binding a click command to a button. Using the json structure

<Button
    ...
    local:MvxBind="{'Click':{'Path':'ThruCommand'}}" />

Using the Swiss Bindings structure

<Button
    ...
    local:MvxBind="Click ThruCommand" />

StackOverflow


Binding data to a text view

Using the json structure

  <TextView android:id="@+id/name"

          local:MvxBind="{'Text':{'Path':'Name'}}"  />

Using the Swiss Bindings structure <TextView android:id="@+id/name"

          local:MvxBind="Text Name"  />


WindowsEdit

Binding a click command to a button.

<Button Command="{Binding SaveCommand}" >

Binding data to a text view

<TextBox Text="{Binding Name,  Mode=TwoWay}" />


TouchEdit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.