Skip to content

PropertyBindingMixins class

Attributes: [RequiresUnreferencedCode("Evaluates expression-based member chains via reflection; members may be trimmed.")] [RequiresDynamicCode("Uses dynamic binding paths which may require runtime code generation or reflection-based invocation.")]

Defined in

Namespace: ReactiveUI.Reactive Assembly: ReactiveUI.Reactive.dll Full name: ReactiveUI.Reactive.PropertyBindingMixins Modifiers: public static

Summary

View source

This class provides extension methods for the ReactiveUI view binding mechanism.

Applies to

net10.0, net10.0-maccatalyst26.0, net10.0-desktop1.0, net10.0-browserwasm1.0, net10.0-tvos26.0, net10.0-windows10.0.19041, net10.0-macos26.0, net10.0-ios26.0, net10.0-android36.0, net9.0, net9.0-tvos18.0, net9.0-macos15.0, net9.0-maccatalyst18.0, net9.0-windows10.0.19041, net9.0-ios18.0, net9.0-desktop1.0, net8.0, net8.0-windows10.0.19041, net8.0-ios18.0, net8.0-maccatalyst18.0, net8.0-macos15.0, net8.0-tvos18.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.5, netstandard2.1, net481, net462, net471

Remarks

The helpers in this class are typically consumed within a view's WhenActivated block to connect a view model property to a control and automatically dispose the binding when the view deactivates. Converters can be supplied via IBindingTypeConverter instances or delegates, and TriggerUpdate indicates whether bindings push values from the view model, the view, or both.

Examples

<![CDATA[
 this.WhenActivated(disposables =>
 {
 this.Bind(ViewModel, vm => vm.UserName, v => v.UserNameTextBox.Text)
 .DisposeWith(disposables);
 
 this.OneWayBind(ViewModel, vm => vm.IsBusy, v => v.Spinner.IsRunning)
 .DisposeWith(disposables);
 });
 ]]>

Methods

NameSummary
static BindTo
static Bind
static OneWayBind
Inherited members

Extension blocks

extension(IObservable this)

  • BindTo
  • BindTo
  • BindTo
  • BindTo

extension(TView view)

  • Bind
  • Bind
  • Bind
  • Bind
  • Bind
  • Bind
  • Bind
  • Bind
  • Bind
  • Bind
  • Bind
  • Bind
  • OneWayBind
  • OneWayBind
  • OneWayBind
  • OneWayBind