Windows Store

Windows Store

For Universal Windows applications, you need to implement IViewFor<T> by hand and ensure that ViewModel is a DependencyProperty. Also, always dispose bindings via WhenActivated, or else the bindings leak memory. You can easily use the new x:Bind syntax with ReactiveUI. All you need is doing {x:Bind ViewModel.TheText, Mode=OneWay}. Remember, that x:Bind bindings are OneTime by default, not OneWay, so in certain scenarios you need to specify the OneWay mode explicitly.

The goal in the example below is to two-way bind TheText property of TheViewModel to the TextBox and one-way bind TheText property to the TextBlock, so the TextBlock updates when the user types text into the TextBox.